summaryrefslogtreecommitdiff
path: root/condvar.c
diff options
context:
space:
mode:
authorrpj <rpj>2000-08-18 08:02:29 +0000
committerrpj <rpj>2000-08-18 08:02:29 +0000
commit11eb4dfd2d42417327fc205c649ea32ee623cf92 (patch)
tree79b7a28890e779a4cc8d77e9289dba919d371bdd /condvar.c
parent88de1621e4371cd118e1a98c9c08ff23c46e6899 (diff)
2000-08-18 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
* Several: Fix typos from scripted edit session yesterday. * nonportable.c (pthread_mutexattr_setforcecs_np): Moved this function from mutex.c. (pthread_getw32threadhandle_np): New function to return the win32 thread handle that the POSIX thread is using. * mutex.c (pthread_mutexattr_setforcecs_np): Moved to new file "nonportable.c". * pthread.h (PTW32_BUILD): Only redefine __except and catch compiler keywords if we aren't building the library (ie. PTW32_BUILD is not defined) - this is safer than defining and then undefining if not building the library. * implement.h: Remove __except and catch undefines. * Makefile (CFLAGS): Define PTW32_BUILD. * GNUmakefile (CFLAGS): Define PTW32_BUILD. * All appropriate: Change Pthread_exception* to ptw32_exception* to be consistent with internal identifier naming. * private.c (ptw32_throw): New function to provide a generic exception throw for all internal exceptions and EH schemes. (ptw32_threadStart): pthread_exit() value is now returned via the thread structure exitStatus element. * exit.c (pthread_exit): pthread_exit() value is now returned via the thread structure exitStatus element. * cancel.c (ptw32_cancel_self): Now uses ptw32_throw. (pthread_setcancelstate): Ditto. (pthread_setcanceltype): Ditto. (pthread_testcancel): Ditto. (pthread_cancel): Ditto. * misc.c (CancelableWait): Ditto. * exit.c (pthread_exit): Ditto. * All applicable: Change PTW32_ prefix to PTW32_ prefix to remove leading underscores from private library identifiers.
Diffstat (limited to 'condvar.c')
-rw-r--r--condvar.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/condvar.c b/condvar.c
index 0f74c9f..87e62d8 100644
--- a/condvar.c
+++ b/condvar.c
@@ -61,7 +61,7 @@ _cond_check_need_init(pthread_cond_t *cond)
* re-initialise it only by calling pthread_cond_init()
* explicitly.
*/
- if (*cond == (pthread_cond_t) _PTHREAD_OBJECT_AUTO_INIT)
+ if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)
{
result = pthread_cond_init(cond, NULL);
}
@@ -464,7 +464,7 @@ pthread_cond_destroy (pthread_cond_t * cond)
return EINVAL;
}
- if (*cond != (pthread_cond_t) _PTHREAD_OBJECT_AUTO_INIT)
+ if (*cond != (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)
{
cv = *cond;
@@ -492,12 +492,12 @@ pthread_cond_destroy (pthread_cond_t * cond)
/*
* See notes in _cond_check_need_init() above also.
*/
- EnterCriticalSection(&ptw32_ond_test_init_lock);
+ EnterCriticalSection(&ptw32_cond_test_init_lock);
/*
* Check again.
*/
- if (*cond == (pthread_cond_t) _PTHREAD_OBJECT_AUTO_INIT)
+ if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)
{
/*
* This is all we need to do to destroy a statically
@@ -604,7 +604,7 @@ cond_timedwait (pthread_cond_t * cond,
* again inside the guarded section of _cond_check_need_init()
* to avoid race conditions.
*/
- if (*cond == (pthread_cond_t) _PTHREAD_OBJECT_AUTO_INIT)
+ if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)
{
result = _cond_check_need_init(cond);
}
@@ -855,7 +855,7 @@ pthread_cond_signal (pthread_cond_t * cond)
* No-op if the CV is static and hasn't been initialised yet.
* Assuming that race conditions are harmless.
*/
- if (cv == (pthread_cond_t) _PTHREAD_OBJECT_AUTO_INIT)
+ if (cv == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)
{
return 0;
}
@@ -926,7 +926,7 @@ pthread_cond_broadcast (pthread_cond_t * cond)
* No-op if the CV is static and hasn't been initialised yet.
* Assuming that any race condition is harmless.
*/
- if (cv == (pthread_cond_t) _PTHREAD_OBJECT_AUTO_INIT)
+ if (cv == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT)
{
return 0;
}