summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpj <rpj>2003-12-10 01:24:18 +0000
committerrpj <rpj>2003-12-10 01:24:18 +0000
commita81bc6544b80c0eb79f9cdc916b7c5a9005dac1c (patch)
tree3eb58e7afa8be655163b17cab0349c21af155fe5
parent28c3d0a235d121db531469449b388af5eaf14013 (diff)
*** empty log message ***
-rw-r--r--sem_timedwait.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sem_timedwait.c b/sem_timedwait.c
index a600ff4..e374006 100644
--- a/sem_timedwait.c
+++ b/sem_timedwait.c
@@ -42,7 +42,7 @@
*/
#ifndef _UWIN
-#include <process.h>
+//#include <process.h>
#endif
#ifndef NEED_FTIME
#include <sys/timeb.h>
@@ -54,7 +54,7 @@
int
-sem_timedwait (sem_t * sem, const struct timespec * abstime)
+sem_timedwait (sem_t * sem, const struct timespec *abstime)
/*
* ------------------------------------------------------
* DOCPUBLIC
@@ -63,10 +63,10 @@ sem_timedwait (sem_t * sem, const struct timespec * abstime)
*
* PARAMETERS
* sem
- * pointer to an instance of sem_t
+ * pointer to an instance of sem_t
*
* abstime
- * pointer to an instance of struct timespec
+ * pointer to an instance of struct timespec
*
* DESCRIPTION
* This function waits on a semaphore. If the
@@ -81,14 +81,14 @@ sem_timedwait (sem_t * sem, const struct timespec * abstime)
* until interrupted by a signal.
*
* RESULTS
- * 0 successfully decreased semaphore,
- * -1 failed, error in errno
+ * 0 successfully decreased semaphore,
+ * -1 failed, error in errno
* ERRNO
- * EINVAL 'sem' is not a valid semaphore,
- * ENOSYS semaphores are not supported,
- * EINTR the function was interrupted by a signal,
- * EDEADLK a deadlock condition was detected.
- * ETIMEDOUT abstime elapsed before success.
+ * EINVAL 'sem' is not a valid semaphore,
+ * ENOSYS semaphores are not supported,
+ * EINTR the function was interrupted by a signal,
+ * EDEADLK a deadlock condition was detected.
+ * ETIMEDOUT abstime elapsed before success.
*
* ------------------------------------------------------
*/
@@ -184,11 +184,11 @@ sem_timedwait (sem_t * sem, const struct timespec * abstime)
}
#ifdef NEED_SEM
-
+
result = (pthreadCancelableTimedWait ((*sem)->event, milliseconds));
-
+
#else /* NEED_SEM */
-
+
result = (pthreadCancelableTimedWait ((*sem)->sem, milliseconds));
#endif
@@ -205,7 +205,7 @@ sem_timedwait (sem_t * sem, const struct timespec * abstime)
#ifdef NEED_SEM
- ptw32_decrease_semaphore(sem);
+ ptw32_decrease_semaphore (sem);
#endif /* NEED_SEM */