summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/evthread_lock_callbacks.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
commit253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch)
treeadf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man3/evthread_lock_callbacks.3
parenta9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff)
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man3/evthread_lock_callbacks.3')
-rw-r--r--static/netbsd/man3/evthread_lock_callbacks.374
1 files changed, 74 insertions, 0 deletions
diff --git a/static/netbsd/man3/evthread_lock_callbacks.3 b/static/netbsd/man3/evthread_lock_callbacks.3
new file mode 100644
index 00000000..a31f978a
--- /dev/null
+++ b/static/netbsd/man3/evthread_lock_callbacks.3
@@ -0,0 +1,74 @@
+.TH "evthread_lock_callbacks" 3 "Tue Jan 31 2017" "libevent" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+evthread_lock_callbacks \- This structure describes the interface a threading library uses for locking\&.
+
+.SH SYNOPSIS
+.br
+.PP
+.PP
+\fC#include <thread\&.h>\fP
+.SS "Data Fields"
+
+.in +1c
+.ti -1c
+.RI "void *(* \fBalloc\fP )(unsigned locktype)"
+.br
+.RI "\fIFunction to allocate and initialize new lock of type 'locktype'\&. \fP"
+.ti -1c
+.RI "void(* \fBfree\fP )(void *\fBlock\fP, unsigned locktype)"
+.br
+.RI "\fIFuntion to release all storage held in 'lock', which was created with type 'locktype'\&. \fP"
+.ti -1c
+.RI "int(* \fBlock\fP )(unsigned mode, void *lock)"
+.br
+.RI "\fIAcquire an already-allocated lock at 'lock' with mode 'mode'\&. \fP"
+.ti -1c
+.RI "int \fBlock_api_version\fP"
+.br
+.RI "\fIThe current version of the locking API\&. \fP"
+.ti -1c
+.RI "unsigned \fBsupported_locktypes\fP"
+.br
+.RI "\fIWhich kinds of locks does this version of the locking API support? A bitfield of EVTHREAD_LOCKTYPE_RECURSIVE and EVTHREAD_LOCKTYPE_READWRITE\&. \fP"
+.ti -1c
+.RI "int(* \fBunlock\fP )(unsigned mode, void *\fBlock\fP)"
+.br
+.RI "\fIRelease a lock at 'lock' using mode 'mode'\&. \fP"
+.in -1c
+.SH "Detailed Description"
+.PP
+This structure describes the interface a threading library uses for locking\&.
+
+It's used to tell \fBevthread_set_lock_callbacks()\fP how to use locking on this platform\&.
+.SH "Field Documentation"
+.PP
+.SS "void*(* evthread_lock_callbacks::alloc) (unsigned locktype)"
+
+.PP
+Function to allocate and initialize new lock of type 'locktype'\&. Returns NULL on failure\&.
+.SS "void(* evthread_lock_callbacks::free) (void *\fBlock\fP, unsigned locktype)"
+
+.PP
+Funtion to release all storage held in 'lock', which was created with type 'locktype'\&.
+.SS "int(* evthread_lock_callbacks::lock) (unsigned mode, void *lock)"
+
+.PP
+Acquire an already-allocated lock at 'lock' with mode 'mode'\&. Returns 0 on success, and nonzero on failure\&.
+.SS "int evthread_lock_callbacks::lock_api_version"
+
+.PP
+The current version of the locking API\&. Set this to EVTHREAD_LOCK_API_VERSION
+.SS "unsigned evthread_lock_callbacks::supported_locktypes"
+
+.PP
+Which kinds of locks does this version of the locking API support? A bitfield of EVTHREAD_LOCKTYPE_RECURSIVE and EVTHREAD_LOCKTYPE_READWRITE\&. (Note that RECURSIVE locks are currently mandatory, and READWRITE locks are not currently used\&.)
+.SS "int(* evthread_lock_callbacks::unlock) (unsigned mode, void *\fBlock\fP)"
+
+.PP
+Release a lock at 'lock' using mode 'mode'\&. Returns 0 on success, and nonzero on failure\&.
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for libevent from the source code\&.