summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-05-16 19:29:12 -0700
committerVito Caputo <vcaputo@pengaru.com>2018-05-16 19:34:09 -0700
commitedc587d28e2bfe4d50fd975e2c66cb41e6907d13 (patch)
tree7dd399594f33d2ed72179d9f8e5d2b6096b21ceb /src
parent54465a2679ca6a04a6ecb0ff58f2d519bf7ab9bc (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.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/pulp.c b/src/pulp.c
index 9cfdbc5..ee32b7c 100644
--- a/src/pulp.c
+++ b/src/pulp.c
@@ -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;
© All Rights Reserved