Rev 1702 | Rev 1780 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1702 | Rev 1757 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup sync |
29 | /** @addtogroup sync |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | 32 | ||
33 | /** |
33 | /** |
34 | * @file |
34 | * @file |
Line 36... | Line 36... | ||
36 | * |
36 | * |
37 | * A reader/writer lock can be held by multiple readers at a time. |
37 | * A reader/writer lock can be held by multiple readers at a time. |
38 | * Or it can be exclusively held by a sole writer at a time. |
38 | * Or it can be exclusively held by a sole writer at a time. |
39 | * |
39 | * |
40 | * These locks are not recursive. |
40 | * These locks are not recursive. |
41 | * Because technique called direct hand-off is used, neither readers |
41 | * Because a technique called direct hand-off is used and because |
- | 42 | * waiting takes place in a single wait queue, neither readers |
|
42 | * nor writers will suffer starvation. |
43 | * nor writers will suffer starvation. |
43 | * |
44 | * |
44 | * If there is a writer followed by a reader waiting for the rwlock |
45 | * If there is a writer followed by a reader waiting for the rwlock |
45 | * and the writer times out, all leading readers are automatically woken up |
46 | * and the writer times out, all leading readers are automatically woken up |
46 | * and allowed in. |
47 | * and allowed in. |
Line 382... | Line 383... | ||
382 | void release_spinlock(void *arg) |
383 | void release_spinlock(void *arg) |
383 | { |
384 | { |
384 | spinlock_unlock((spinlock_t *) arg); |
385 | spinlock_unlock((spinlock_t *) arg); |
385 | } |
386 | } |
386 | 387 | ||
387 | /** @} |
388 | /** @} |
388 | */ |
389 | */ |
389 | - |