diff options
author | Russ Cox <rsc@swtch.com> | 2020-01-14 12:40:09 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-01-14 13:58:47 -0500 |
commit | 8c573cab6819c69142389d36b978b3c683771afe (patch) | |
tree | 8c97a0523b4b9dbddc2ad5afc49e89d9815ecbda /src/libthread/stkmalloc.c | |
parent | 4ae529dbfe8573ae105d0d66f7f453c4f850fa1f (diff) | |
download | plan9port-8c573cab6819c69142389d36b978b3c683771afe.tar.gz plan9port-8c573cab6819c69142389d36b978b3c683771afe.tar.bz2 plan9port-8c573cab6819c69142389d36b978b3c683771afe.zip |
libthread: use mmap to allocate OpenBSD stacks
Should fix faults on OpenBSD.
Fixes #218.
Fixes #226.
Diffstat (limited to 'src/libthread/stkmalloc.c')
-rw-r--r-- | src/libthread/stkmalloc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libthread/stkmalloc.c b/src/libthread/stkmalloc.c new file mode 100644 index 00000000..083aea1b --- /dev/null +++ b/src/libthread/stkmalloc.c @@ -0,0 +1,13 @@ +#include "threadimpl.h" + +void* +_threadstkalloc(int n) +{ + return malloc(n); +} + +void +_threadstkfree(void *v, int n) +{ + free(v); +} |