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

Diff of /hurd/libpthread/sysdeps/generic/pt-rwlock-timedrdlock.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 reading.  Generic version.  /* Acquire a rwlock for reading.  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_timedrdlock (struct __pthread_rwlock *rwlock,  
                             const struct timespec *abstime)  
 {  
   return __pthread_rwlock_timedrdlock_internal (rwlock, abstime);  
 }  
   
25  /* Acquire the rwlock *RWLOCK for reading blocking until *ABSTIME if  /* Acquire the rwlock *RWLOCK for reading blocking until *ABSTIME if
26     it is already held.  As a GNU extension, if TIMESPEC is NULL then     it is already held.  As a GNU extension, if TIMESPEC is NULL then
27     wait forever.  */     wait forever.  */
# Line 66  __pthread_rwlock_timedrdlock_internal (s Line 59  __pthread_rwlock_timedrdlock_internal (s
59    /* Better be blocked by a writer.  */    /* Better be blocked by a writer.  */
60    assert (rwlock->readers == 0);    assert (rwlock->readers == 0);
61    
62      if (abstime && (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000))
63        return EINVAL;
64    
65    self = _pthread_self ();    self = _pthread_self ();
66    
67    /* Add ourself to the queue.  */    /* Add ourself to the queue.  */
# Line 108  __pthread_rwlock_timedrdlock_internal (s Line 104  __pthread_rwlock_timedrdlock_internal (s
104    
105    return 0;    return 0;
106  }  }
107    
108    int
109    pthread_rwlock_timedrdlock (struct __pthread_rwlock *rwlock,
110                                const struct timespec *abstime)
111    {
112      return __pthread_rwlock_timedrdlock_internal (rwlock, abstime);
113    }

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