summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/zix/common.h1
-rw-r--r--include/zix/sem.h5
-rw-r--r--include/zix/thread.h4
3 files changed, 6 insertions, 4 deletions
diff --git a/include/zix/common.h b/include/zix/common.h
index 0cefd55..a097edd 100644
--- a/include/zix/common.h
+++ b/include/zix/common.h
@@ -29,6 +29,7 @@ typedef enum {
ZIX_STATUS_TIMEOUT,
ZIX_STATUS_OVERFLOW,
ZIX_STATUS_NOT_SUPPORTED,
+ ZIX_STATUS_UNAVAILABLE,
} ZixStatus;
/// Return a string describing a status code
diff --git a/include/zix/sem.h b/include/zix/sem.h
index 4c82f17..41b9860 100644
--- a/include/zix/sem.h
+++ b/include/zix/sem.h
@@ -97,8 +97,9 @@ zix_sem_wait(ZixSem* ZIX_NONNULL sem);
/**
Non-blocking version of wait().
- @return #ZIX_STATUS_SUCCESS if `sem` was decremented, #ZIX_STATUS_TIMEOUT if
- it was already zero, or #ZIX_STATUS_BAD_ARG if `sem` is invalid.
+ @return #ZIX_STATUS_SUCCESS if `sem` was decremented,
+ #ZIX_STATUS_UNAVAILABLE if it was already zero, or #ZIX_STATUS_BAD_ARG if
+ `sem` is invalid.
*/
ZIX_API
ZixStatus
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