diff options
author | rpj <rpj> | 2003-08-13 15:10:53 +0000 |
---|---|---|
committer | rpj <rpj> | 2003-08-13 15:10:53 +0000 |
commit | 414f4bd7e70d94025576d9264c86da63c506f6ca (patch) | |
tree | ed0d8de3bd5fbccd0191b3e6cc1e0d86ebe8ff97 /pthread_spin_lock.c | |
parent | 614c09bf607cf77c70c7435cd615c9f8b684bc5e (diff) |
Bug fixes plus adaptation to current MinGW/MsysDTK environment. Changes to tests/benchmarks.
Diffstat (limited to 'pthread_spin_lock.c')
-rw-r--r-- | pthread_spin_lock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index d3355d1..f9210f1 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -38,14 +38,16 @@ #include "implement.h" -/* - * NOTE: For speed, these routines don't check if "lock" is valid. - */ int pthread_spin_lock(pthread_spinlock_t *lock) { register pthread_spinlock_t s; + if (NULL == lock || NULL == *lock) + { + return(EINVAL); + } + if (*lock == PTHREAD_SPINLOCK_INITIALIZER) { int result; |