/[hurd]/hurd/libpthread/sysdeps/generic/bits/rwlock.h
ViewVC logotype

Diff of /hurd/libpthread/sysdeps/generic/bits/rwlock.h

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

revision 1.1 by neal, Thu Oct 10 23:05:05 2002 UTC revision 1.2 by neal, Thu May 12 20:55:38 2005 UTC
# Line 1  Line 1 
1  /* rwlock type.  Generic version.  /* rwlock type.  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 40  struct __pthread_rwlock Line 40  struct __pthread_rwlock
40    
41  /* Initializer for a rwlock.  */  /* Initializer for a rwlock.  */
42  #define __PTHREAD_RWLOCK_INITIALIZER \  #define __PTHREAD_RWLOCK_INITIALIZER \
43      ((struct __pthread_rwlock) \      { __SPIN_LOCK_INITIALIZER, __SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0 }
       { __SPIN_LOCK_INITIALIZER, __SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0 })  
44    
45    
46  _EXTERN_INLINE int  _EXTERN_INLINE int
47  pthread_rwlock_init (struct __pthread_rwlock *__rwlock,  pthread_rwlock_init (struct __pthread_rwlock *__rwlock,
48                       const struct __pthread_rwlockattr *__attr)                       const struct __pthread_rwlockattr *__attr)
49  {  {
50      struct __pthread_rwlock initialized_rwlock = __PTHREAD_RWLOCK_INITIALIZER;
51    extern int _pthread_rwlock_init (struct __pthread_rwlock *,    extern int _pthread_rwlock_init (struct __pthread_rwlock *,
52                                     const struct __pthread_rwlockattr *);                                     const struct __pthread_rwlockattr *);
53    
54    if (__attr)    if (__attr)
55      return _pthread_rwlock_init (__rwlock, __attr);      return _pthread_rwlock_init (__rwlock, __attr);
56    
57    *__rwlock = __PTHREAD_RWLOCK_INITIALIZER;    *__rwlock = initialized_rwlock;
58    return 0;    return 0;
59  }  }
60    

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