diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-05-16 19:29:12 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-05-16 19:34:09 -0700 |
commit | edc587d28e2bfe4d50fd975e2c66cb41e6907d13 (patch) | |
tree | 7dd399594f33d2ed72179d9f8e5d2b6096b21ceb /src | |
parent | 54465a2679ca6a04a6ecb0ff58f2d519bf7ab9bc (diff) |
libpulp: experimental considerations for OSX
I don't have an OSX system to test with, but after some digging
this looks like it might suffice.
Diffstat (limited to 'src')
-rw-r--r-- | src/pulp.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -27,6 +27,12 @@ * */ +#ifdef __MACH__ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE +#endif +#endif + #include <assert.h> #include <errno.h> #include <thunk.h> @@ -46,9 +52,15 @@ #define PULP_USECS_PER_SEC 1000000ULL #define PULP_USECS_PER_MSEC 1000ULL -#define PULP_FIBER_STACK_SIZE (16 * 1024) #define PULP_FIBER_ALLOC_NUM 32 +#ifdef __MACH__ +#include <signal.h> +#define PULP_FIBER_STACK_SIZE SIGSTKSZ +#else +#define PULP_FIBER_STACK_SIZE (16 * 1024) +#endif + typedef struct pulp_context_t { #ifdef __WIN32__ LPVOID win32_fiber; |