diff options
author | rpj <rpj> | 2002-02-01 07:24:03 +0000 |
---|---|---|
committer | rpj <rpj> | 2002-02-01 07:24:03 +0000 |
commit | 6a65a568fa4d9515265842c8bcf11a7449f3c325 (patch) | |
tree | 35cd38d44cd0d61c7ba3a6026eb3e696e9173453 /semaphore.c | |
parent | f9c50f211c388410ccd8919f522cdd2c8d2d3904 (diff) |
* semaphore.c (sem_trywait): Fix missing errno return
for systems that define NEED_SEM (e.g. early WinCE).
* mutex.c (pthread_mutex_timedlock): Return ENOTSUP
for systems that define NEED_SEM since they don't
have sem_trywait().
Diffstat (limited to 'semaphore.c')
-rw-r--r-- | semaphore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/semaphore.c b/semaphore.c index 54005db..86222ec 100644 --- a/semaphore.c +++ b/semaphore.c @@ -258,7 +258,7 @@ sem_trywait (sem_t * sem) * ERRNO * EAGAIN the semaphore was already locked, * EINVAL 'sem' is not a valid semaphore, - * ENOSYS semaphores are not supported, + * ENOTSUP sem_trywait is not supported, * EINTR the function was interrupted by a signal, * EDEADLK a deadlock condition was detected. * @@ -270,7 +270,7 @@ sem_trywait (sem_t * sem) /* * not yet implemented! */ - int result = EINVAL; + errno = ENOTSUP; return -1; #else /* NEED_SEM */ |