/[hurd]/hurd/libpthread/sysdeps/generic/pt-mutex-trylock.c
ViewVC logotype

Diff of /hurd/libpthread/sysdeps/generic/pt-mutex-trylock.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by neal, Thu Oct 10 23:05:06 2002 UTC revision 1.2 by neal, Mon May 2 22:00:33 2005 UTC
# Line 1  Line 1 
1  /* Try to Lock a mutex.  Generic version.  /* Try to Lock a mutex.  Generic version.
2     Copyright (C) 2002 Free Software Foundation, Inc.     Copyright (C) 2002, 2005 Free Software Foundation, Inc.
3     This file is part of the GNU C Library.     This file is part of the GNU C Library.
4    
5     The GNU C Library is free software; you can redistribute it and/or     The GNU C Library is free software; you can redistribute it and/or
# Line 23  Line 23 
23    
24  #define LOSE do { * (int *) 0 = 0; } while (1)  #define LOSE do { * (int *) 0 = 0; } while (1)
25    
26  /* Lock MUTEX, block if we can't get it.  */  /* Lock MUTEX, return EBUSY if we can't get it.  */
27  int  int
28  __pthread_mutex_trylock (struct __pthread_mutex *mutex)  __pthread_mutex_trylock (struct __pthread_mutex *mutex)
29  {  {
# Line 82  __pthread_mutex_trylock (struct __pthrea Line 82  __pthread_mutex_trylock (struct __pthrea
82          }          }
83      }      }
84    
85      __pthread_spin_unlock (&mutex->__lock);
86    
87    return err;    return err;
88  }  }
89    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26