diff options
Diffstat (limited to 'sysdeps/generic/pt-mutex-trylock.c')
-rw-r--r-- | sysdeps/generic/pt-mutex-trylock.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/generic/pt-mutex-trylock.c b/sysdeps/generic/pt-mutex-trylock.c index b3c3fe3..9457dda 100644 --- a/sysdeps/generic/pt-mutex-trylock.c +++ b/sysdeps/generic/pt-mutex-trylock.c @@ -1,5 +1,5 @@ /* Try to Lock a mutex. Generic version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,7 +23,7 @@ #define LOSE do { * (int *) 0 = 0; } while (1) -/* Lock MUTEX, block if we can't get it. */ +/* Lock MUTEX, return EBUSY if we can't get it. */ int __pthread_mutex_trylock (struct __pthread_mutex *mutex) { @@ -82,6 +82,8 @@ __pthread_mutex_trylock (struct __pthread_mutex *mutex) } } + __pthread_spin_unlock (&mutex->__lock); + return err; } |