/[hurd]/hurd/libpthread/sysdeps/generic/pt-rwlock-timedwrlock.c
ViewVC logotype

Diff of /hurd/libpthread/sysdeps/generic/pt-rwlock-timedwrlock.c

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

revision 1.2 by neal, Mon Nov 18 22:20:58 2002 UTC revision 1.3 by neal, Thu May 12 20:55:38 2005 UTC
# Line 1  Line 1 
1  /* Acquire a rwlock for writing.  Generic version.  /* Acquire a rwlock for writing.  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 22  Line 22 
22    
23  #include <pt-internal.h>  #include <pt-internal.h>
24    
 int  
 pthread_rwlock_timedwrlock (struct __pthread_rwlock *rwlock,  
                             const struct timespec *abstime)  
 {  
   return __pthread_rwlock_timedwrlock_internal (rwlock, abstime);  
 }  
   
25  /* Acquire RWLOCK for writing blocking until *ABSTIME if we cannot get  /* Acquire RWLOCK for writing blocking until *ABSTIME if we cannot get
26     it.  As a special GNU extension, if ABSTIME is NULL then the wait     it.  As a special GNU extension, if ABSTIME is NULL then the wait
27     shall not time out.  */     shall not time out.  */
# Line 52  __pthread_rwlock_timedwrlock_internal (s Line 45  __pthread_rwlock_timedwrlock_internal (s
45    
46    /* The lock is busy.  */    /* The lock is busy.  */
47    
48      if (abstime && (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000))
49        return EINVAL;
50    
51    self = _pthread_self ();    self = _pthread_self ();
52    
53    /* Add ourselves to the queue.  */    /* Add ourselves to the queue.  */
# Line 90  __pthread_rwlock_timedwrlock_internal (s Line 86  __pthread_rwlock_timedwrlock_internal (s
86    
87    return 0;    return 0;
88  }  }
89    
90    int
91    pthread_rwlock_timedwrlock (struct __pthread_rwlock *rwlock,
92                                const struct timespec *abstime)
93    {
94      return __pthread_rwlock_timedwrlock_internal (rwlock, abstime);
95    }

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

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