Changeset 116d1ef4 in mainline for generic/src/synch/rwlock.c
- Timestamp:
- 2006-06-02T12:26:50Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d0c5901
- Parents:
- 01ebbdf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/synch/rwlock.c
r01ebbdf r116d1ef4 90 90 * @param rwl Reader/Writer lock. 91 91 * @param usec Timeout in microseconds. 92 * @param trylock Switches between blocking and non-blocking mode.92 * @param flags Specify mode of operation. 93 93 * 94 94 * For exact description of possible combinations of 95 * @usec and @trylock, see comment for waitq_sleep_timeout().95 * usec and flags, see comment for waitq_sleep_timeout(). 96 96 * 97 97 * @return See comment for waitq_sleep_timeout(). 98 98 */ 99 int _rwlock_write_lock_timeout(rwlock_t *rwl, __u32 usec, int trylock)99 int _rwlock_write_lock_timeout(rwlock_t *rwl, __u32 usec, int flags) 100 100 { 101 101 ipl_t ipl; … … 112 112 * They just need to acquire the exclusive mutex. 113 113 */ 114 rc = _mutex_lock_timeout(&rwl->exclusive, usec, trylock);114 rc = _mutex_lock_timeout(&rwl->exclusive, usec, flags); 115 115 if (SYNCH_FAILED(rc)) { 116 116 117 117 /* 118 * Lock operation timed out .118 * Lock operation timed out or was interrupted. 119 119 * The state of rwl is UNKNOWN at this point. 120 120 * No claims about its holder can be made. … … 144 144 * @param rwl Reader/Writer lock. 145 145 * @param usec Timeout in microseconds. 146 * @param trylock Switches between blocking and non-blocking mode.146 * @param flags Select mode of operation. 147 147 * 148 148 * For exact description of possible combinations of 149 * usec and trylock, see comment for waitq_sleep_timeout().149 * usec and flags, see comment for waitq_sleep_timeout(). 150 150 * 151 151 * @return See comment for waitq_sleep_timeout(). 152 152 */ 153 int _rwlock_read_lock_timeout(rwlock_t *rwl, __u32 usec, int trylock)153 int _rwlock_read_lock_timeout(rwlock_t *rwl, __u32 usec, int flags) 154 154 { 155 155 int rc; … … 200 200 #endif 201 201 202 rc = _mutex_lock_timeout(&rwl->exclusive, usec, trylock);202 rc = _mutex_lock_timeout(&rwl->exclusive, usec, flags); 203 203 switch (rc) { 204 204 case ESYNCH_WOULD_BLOCK: … … 209 209 spinlock_unlock(&rwl->lock); 210 210 case ESYNCH_TIMEOUT: 211 case ESYNCH_INTERRUPTED: 211 212 /* 212 * The sleep time outed.213 * The sleep timed out. 213 214 * We just restore interrupt priority level. 214 215 */
Note:
See TracChangeset
for help on using the changeset viewer.