Lines Matching +full:spin +full:- +full:up

1 .\" Copyright (c) 2007 Julian Elischer  (julian -  freebsd org )
45 then a thread attempting to acquire the mutex will spin rather than yielding
52 .Ss Spin Mutexes
53 Spin mutexes are a variation of basic mutexes; the main difference between
54 the two is that spin mutexes never block.
55 Instead, they spin while waiting for the lock to be released.
56 To avoid deadlock, a thread that holds a spin mutex must never yield its CPU.
57 Unlike ordinary mutexes, spin mutexes disable interrupts when acquired.
60 Spin mutexes should be used only when absolutely necessary,
98 .Ss Read-Mostly Locks
99 Read-mostly locks are similar to
102 .Em Read-mostly
104 using a caller-supplied
111 .Ss Sleepable Read-Mostly Locks
112 Sleepable read-mostly locks are a variation on read-mostly locks.
146 .Ss Non-blocking synchronization
151 which can be used to provide read-only access to a data structure while one or
160 Thus, they are a useful building block in the construction of lock-free
164 in preference to traditional mutual exclusion-based synchronization,
165 except when performance or non-blocking guarantees are a major concern.
193 reader/writer locks, read-mostly locks, and shared/exclusive locks.
207 also handle event-based thread blocking.
231 are woken up later by
280 .Bl -enum
286 Note that infrastructure to do this is slowly going away as non-MPSAFE
289 Giant must be locked before other non-sleepable locks.
293 There are places in the kernel that drop Giant and pick it back up
330 mutexes, reader/writer locks and read-mostly locks.
333 sleepable read-mostly locks, shared/exclusive locks, lockmanager locks,
336 .Bl -bullet
339 while holding a spin mutex.
374 .Bl -column ".Ic xxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXXXX" ".…
375 .It Em " You want:" Ta spin mtx Ta mutex/rw Ta rmlock Ta sleep rm Ta sx/lk Ta sleep
376 .It Em "You have: " Ta -------- Ta -------- Ta ------ Ta -------- Ta ------ Ta ------
377 .It spin mtx Ta \&ok Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no-1
378 .It mutex/rw Ta \&ok Ta \&ok Ta \&ok Ta \&no Ta \&no Ta \&no-1
379 .It rmlock Ta \&ok Ta \&ok Ta \&ok Ta \&no Ta \&no Ta \&no-1
380 .It sleep rm Ta \&ok Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok-2 Ta \&ok-2/3
381 .It sx Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok-3
397 read-mostly lock.
406 Note that non-blocking try operations on locks are always permitted.
410 .Bl -column ".Ic Xxxxxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXXXX"…
411 .It Em "Context:" Ta spin mtx Ta mutex/rw Ta rmlock Ta sleep rm Ta sx/lk Ta sleep