phunix/external/bsd/libevent/man/evthread_lock_callbacks.3
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

77 lines
2.6 KiB
Groff

.TH "evthread_lock_callbacks" 3 "Tue Jan 27 2015" "libevent" \" -*- nroff -*-
.ad l
.nh
.SH NAME
evthread_lock_callbacks \-
.PP
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\&.