summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2010-12-03 19:21:59 +0000
committerroot <root>2010-12-03 19:21:59 +0000
commit039ff8ce0565fd898d3d0b24c8ce547b5bd8ee30 (patch)
tree2184e7e2e97193b88cbb7448de21dd8276338403
parent303257cce4e5649e42b424ee305a658fd2e4238f (diff)
*** empty log message ***
-rw-r--r--coro.c4
-rw-r--r--coro.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/coro.c b/coro.c
index cbc5eeb..a9137f3 100644
--- a/coro.c
+++ b/coro.c
@@ -404,7 +404,11 @@ coro_create (coro_context *ctx, coro_func coro, void *arg, void *sptr, long ssiz
args.main = &nctx;
pthread_attr_init (&attr);
+#if __UCLIBC__
+ pthread_attr_setstacksize (&attr, (size_t)ssize);
+#else
pthread_attr_setstack (&attr, sptr, (size_t)ssize);
+#endif
pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS);
pthread_create (&ctx->id, &attr, coro_init, &args);
diff --git a/coro.h b/coro.h
index 078a16b..19f0a8d 100644
--- a/coro.h
+++ b/coro.h
@@ -69,6 +69,7 @@
* 2008-11-16 work around a freebsd pthread bug.
* 2008-11-19 define coro_*jmp symbols for easier porting.
* 2009-06-23 tentative win32-backend support for mingw32 (Yasuhiro Matsumoto).
+ * 2010-12-03 tentative support for uclibc (which lacks all sorts of things).
*/
#ifndef CORO_H