Rev 557 | Rev 625 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 557 | Rev 623 | ||
---|---|---|---|
Line 190... | Line 190... | ||
190 | * In order to prevent a race condition when a reader |
190 | * In order to prevent a race condition when a reader |
191 | * could block another reader at the head of the waitq, |
191 | * could block another reader at the head of the waitq, |
192 | * we register a function to unlock rwl->lock |
192 | * we register a function to unlock rwl->lock |
193 | * after this thread is put asleep. |
193 | * after this thread is put asleep. |
194 | */ |
194 | */ |
- | 195 | #ifdef CONFIG_SMP |
|
195 | thread_register_call_me(release_spinlock, &rwl->lock); |
196 | thread_register_call_me(release_spinlock, &rwl->lock); |
- | 197 | #else |
|
- | 198 | thread_register_call_me(release_spinlock, NULL); |
|
- | 199 | #endif |
|
196 | 200 | ||
197 | rc = _mutex_lock_timeout(&rwl->exclusive, usec, trylock); |
201 | rc = _mutex_lock_timeout(&rwl->exclusive, usec, trylock); |
198 | switch (rc) { |
202 | switch (rc) { |
199 | case ESYNCH_WOULD_BLOCK: |
203 | case ESYNCH_WOULD_BLOCK: |
200 | /* |
204 | /* |