From: Sascha Wildner Date: Sat, 11 Jun 2011 01:02:11 +0000 (+0200) Subject: token.9: Some cleanup. X-Git-Tag: v2.12.0~472 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/8e9c3bf6ed4fc9330393b5dbd8e59a6805ce59d6 token.9: Some cleanup. * Add missing MLINKS for lwkt_token_swap(). * Start sentences on a new line. * Trailing whitespace removal. * Bump date. --- diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index ac233e86b0..147b02f952 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -855,6 +855,7 @@ MLINKS+=token.9 lwkt_getpooltoken.9 \ token.9 lwkt_reltoken.9 \ token.9 lwkt_token_init.9 \ token.9 lwkt_token_pool_lookup.9 \ + token.9 lwkt_token_swap.9 \ token.9 lwkt_token_uninit.9 \ token.9 lwkt_trytoken.9 MLINKS+=tvtohz.9 tvtohz_high.9 \ diff --git a/share/man/man9/token.9 b/share/man/man9/token.9 index 9a48d2185e..3b4616e2f3 100644 --- a/share/man/man9/token.9 +++ b/share/man/man9/token.9 @@ -31,7 +31,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 31, 2010 +.Dd June 10, 2010 .Dt TOKEN 9 .Os .Sh NAME @@ -43,7 +43,7 @@ .Nm lwkt_token_pool_lookup , .Nm lwkt_getpooltoken , .Nm lwkt_relpooltoken , -.Nm lwkt_token_swap , +.Nm lwkt_token_swap .Nd soft token locks .Sh SYNOPSIS .In sys/thread.h @@ -62,7 +62,7 @@ .Ft struct lwkt_token * .Fn lwkt_getpooltoken "void *ptr" .Ft void -.Fn lwkt_token_swap "" +.Fn lwkt_token_swap "void" .Sh DESCRIPTION A soft token is a lock which is only held while a thread is running. If a thread explicitly blocks, all its tokens are released, and reacquired @@ -80,7 +80,8 @@ is implemented by a set of statically allocated tokens and a hash function. .Pp The .Fn lwkt_token_init -function is called to initialize a token. The +function is called to initialize a token. +The .Fa desc argument specifies the wait string displayed when waiting for the token. The @@ -111,11 +112,11 @@ Use these two functions when tokens must protect a data structure, but the structure can be deallocated. Pool tokens do not need to be initialized. .Pp -The +The .Fn lwkt_token_swap function swaps the two most recently acquired tokens; this allows release of -tokens out-of-order. This function should not be called when less than two -tokens are held. +tokens out-of-order. +This function should not be called when less than two tokens are held. .Sh EXAMPLES A simple example of using a token to protect access to a data structure: .Bd -literal