Subversion Repositories HelenOS

Rev

Rev 1787 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 jermar 1
 
2
                                 SPINNING LOCKS
3
                spinlock_lock, spinlock_trylock, spinlock_unlock
4
                                 +------------+
5
                                 | spinlock_t |
6
                                 +------------+
7
 
8
                                   WAIT QUEUES
9
                         waitq_sleep_timeout, waitq_wakeup
10
                                   +---------+
11
                                   | waitq_t |
12
			           +---------+
13
				  /           \
14
               SEMAPHORES        /             \  CONDITION VARIABLES
15
 semaphore_down_timeout, semaphore_up    condvar_wait_timeout, condvar_signal
16
            +--------------+   /                 \   +-----------+
17
            | semaphore_t  |<-+                   +->| condvar_t |
18
            +--------------+                         +-----------+
19
                   |                                       ^
20
		   |                                       |
21
                   |                                +------+
22
                   V                               /           
23
                MUTEXES                           / READERS/WRITERS LOCKS
24
    mutex_lock_timeout, mutex_unlock   rwlock_reader/writer_lock_timeout, rwlock_unlock
25
              +---------+                       /        +----------+
26
	      | mutex_t |------------------------------->| rwlock_t |
27
	      +---------+                     /          +----------+
28
	           |                         /
29
		   +------------------------+