diff options
author | jeff <jeff@FreeBSD.org> | 2003-04-01 01:10:42 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-04-01 01:10:42 +0000 |
commit | 2921bb5e340b11ef7fb7b5edc4475f8c07c560f9 (patch) | |
tree | 29698b967989fc4cadf8c3fa0ed39584863c8544 /lib/libthr/thread/thr_find_thread.c | |
parent | 919a0c8fa4f9d76b60607363f2efe4f3a816d387 (diff) | |
download | FreeBSD-src-2921bb5e340b11ef7fb7b5edc4475f8c07c560f9.zip FreeBSD-src-2921bb5e340b11ef7fb7b5edc4475f8c07c560f9.tar.gz |
- Add an api for doing smp safe locks in userland.
- umtx_lock() is defined as an inline in umtx.h. It tries to do an
uncontested acquire of a lock which falls back to the _umtx_lock()
system-call if that fails.
- umtx_unlock() is also an inline which falls back to _umtx_unlock() if the
uncontested unlock fails.
- Locks are keyed off of the thr_id_t of the currently running thread which
is currently just the pointer to the 'struct thread' in kernel.
- _umtx_lock() uses the proc pointer to synchronize access to blocked thread
queues which are stored in the first blocked thread.
Diffstat (limited to 'lib/libthr/thread/thr_find_thread.c')
0 files changed, 0 insertions, 0 deletions