diff options
| -rw-r--r-- | ChangeLog | 9 | ||||
| -rw-r--r-- | mutex.c | 10 | ||||
| -rw-r--r-- | sync.c | 2 | 
3 files changed, 14 insertions, 7 deletions
| @@ -1,4 +1,11 @@ -Sat Feb 18 16:2s1703:30 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au> +Fri Feb 19 16:2s1703:30 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au> + +	* sync.c (pthread_join): Fix pthread_equal() test. + +	* mutex.c (pthread_mutex_trylock): Check mutex != NULL before +	using it. + +Thu Feb 18 16:2s1703:30 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>  	* misc.c (pthread_equal): Fix inverted result. @@ -508,17 +508,17 @@ pthread_mutex_trylock(pthread_mutex_t *mutex)  {    int result = 0; +  if (mutex == NULL) +    { +      return EINVAL; +    } +    if (mutex->mutex == 0 && _pthread_try_enter_critical_section == NULL)      {        /* TryEnterCriticalSection does not exist in the OS; return ENOSYS. */        return ENOSYS;      } -  if (mutex == NULL) -    { -      return EINVAL; -    } -    /*     * We do a quick check to see if we need to do more work     * to initialise a static mutex. We check 'staticinit' @@ -100,7 +100,7 @@ pthread_join (pthread_t thread, void **value_ptr)    self = pthread_self (); -  if (pthread_equal (self, thread) == 0) +  if (pthread_equal (self, thread) != 0)      {        result = EDEADLK;      } | 
