diff options
author | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-18 17:59:41 +0400 |
---|---|---|
committer | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-18 17:59:41 +0400 |
commit | cd51e2a0684992fdbe2736d33fbea5b041e14f70 (patch) | |
tree | d26b5cc146794fd4b499f5f4aeb22af21987433e | |
parent | 75ac1953b6d07eacc32b2eff67f454af3ac6d900 (diff) | |
download | kit-cd51e2a0684992fdbe2736d33fbea5b041e14f70.zip |
test
-rw-r--r-- | source/kit/threads.posix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/kit/threads.posix.c b/source/kit/threads.posix.c index 66610ae..d234686 100644 --- a/source/kit/threads.posix.c +++ b/source/kit/threads.posix.c @@ -43,6 +43,8 @@ # include "allocator.h" # include "threads.h" +# include <stdio.h> + /* Configuration macro: @@ -241,8 +243,10 @@ int thrd_create_with_stack(thrd_t *thr, thrd_start_t func, void *arg, if (stack_size > 0) { if (pthread_attr_init(&attr) != 0) return thrd_nomem; - if (pthread_attr_setstacksize(&attr, (size_t) stack_size) != 0) + if (pthread_attr_setstacksize(&attr, (size_t) stack_size) != 0) { + printf("%% pthread_attr_setstacksize failed\n"); return thrd_wrong_stack_size; + } attr_p = &attr; } kit_allocator_t alloc = kit_alloc_default(); @@ -257,6 +261,7 @@ int thrd_create_with_stack(thrd_t *thr, thrd_start_t func, void *arg, pack->arg = arg; pack->alloc = alloc; if (pthread_create(thr, attr_p, impl_thrd_routine, pack) != 0) { + printf("%% pthread_create failed\n"); alloc.deallocate(alloc.state, pack); if (attr_p) pthread_attr_destroy(attr_p); |