changeset 788:a2d5dca1f525

man: write a manpage for MX{INIT,DESTROY,LOCK,UNLOCK} Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sun, 24 Feb 2019 17:42:58 -0500
parents 956336e508e2
children 14e07927c8a6
files man/mxinit.3
diffstat 1 files changed, 39 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/man/mxinit.3	Sun Feb 24 17:42:58 2019 -0500
@@ -0,0 +1,39 @@
+.Dd February 24, 2019
+.Dt MXINIT 3
+.Os
+.\"
+.Sh NAME
+.Nm MXINIT ,
+.Nm MXDESTROY ,
+.Nm MXLOCK ,
+.Nm MXUNLOCK
+.Nd synchronize access to shared data structures
+.\"
+.Sh SYNOPSIS
+.In jeffpc/synch.h
+.Ft void
+.Fn MXINIT "struct lock *lock" "struct lock_class *lclass"
+.Ft void
+.Fn MXDESTROY "struct lock *lock"
+.Ft void
+.Fn MXLOCK "struct lock *lock"
+.Ft void
+.Fn MXUNLOCK "struct lock *lock"
+.\"
+.Sh DESCRIPTION
+These functions wrap the system provided pthread mutex type to simplify the
+mutex API, provide as close to identical error checks across all platforms,
+and in general increase the amount of error checking performed.
+.\"
+.Sh ERRORS
+Specifying illegal arguments results in a panic.
+The panic message includes detailed information about which constraint was
+violated.
+There is no way to recover from these panics as they imply something is very
+wrong with the codebase.
+.\"
+.Sh SEE ALSO
+.Xr pthread_mutex_destroy 3 ,
+.Xr pthread_mutex_init 3 ,
+.Xr pthread_mutex_lock 3 ,
+.Xr pthread_mutex_unlock 3