From 7cd6a5437c263a4e2b64bafdf780d60ce51f941f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 1 Sep 2022 23:14:03 -0400 Subject: Simplify thread and semaphore status codes --- include/zix/thread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/zix/thread.h') diff --git a/include/zix/thread.h b/include/zix/thread.h index bad939f..482315a 100644 --- a/include/zix/thread.h +++ b/include/zix/thread.h @@ -103,9 +103,9 @@ zix_thread_create(ZixThread* thread, pthread_attr_setstacksize(&attr, stack_size); const int ret = pthread_create(thread, NULL, function, arg); - pthread_attr_destroy(&attr); - return ret == EAGAIN ? ZIX_STATUS_NO_MEM : zix_errno_status(ret); + pthread_attr_destroy(&attr); + return zix_errno_status(ret); } static inline ZixStatus -- cgit v1.2.1