Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-localcount]: src/share/man/man9 Improve description of localcou...
details: https://anonhg.NetBSD.org/src/rev/4f71700443fc
branches: pgoyette-localcount
changeset: 852797:4f71700443fc
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Jul 16 23:28:37 2016 +0000
description:
Improve description of localcount_release
diffstat:
share/man/man9/localcount.9 | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diffs (63 lines):
diff -r 3cbcd720c873 -r 4f71700443fc share/man/man9/localcount.9
--- a/share/man/man9/localcount.9 Sat Jul 16 23:13:59 2016 +0000
+++ b/share/man/man9/localcount.9 Sat Jul 16 23:28:37 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: localcount.9,v 1.1.2.2 2016/07/16 23:13:59 pgoyette Exp $
+.\" $NetBSD: localcount.9,v 1.1.2.3 2016/07/16 23:28:37 pgoyette Exp $
.\"
.\" Copyright (c) 2016
.\" All rights reserved.
@@ -86,36 +86,42 @@
.Bl -tag -width abcd
.It Fn localcount_init "lc"
.Pp
-Dynamically initialize a localcount for use.
+Dynamically initialize localcount
+.Ar lc
+for use.
.Pp
No other operations can be performed on a localcount until it has been
initialized.
.It Fn localcount_fini "lc"
.Pp
-Release resources used by a localcount.
+Release resources used by localcount
+.Ar lc .
The caller must have already called
-.fn localcount_drain .
+.Fn localcount_drain .
The localcount may not be used after
.Fn localcount_fini
has been called until it has been re-initialized by
.Fn localcount_init .
.It Fn localcount_acquire "lc"
.Pp
-Acquire a reference to the localcount.
+Acquire a reference to the localcount
+.Ar lc .
.It Fn localcount_release "lc" "cv" "mtx"
.Pp
-Release a reference to the localcount.
-Must be called with the mutex
+Release a reference to the localcount
+.Ar lc .
+If the localcount is currently being drained, the mutex
.Ar mtx
-locked.
-If the localcount is being drained, and the reference count goes to zero,
-.Fn localcout_release
+will be used to synchronize updates to the global reference count (i.e.
+the total across all CPUs).
+If the reference count goes to zero,
+.Fn localcount_release
will broadcast availability of the condvar
.Ar cv .
.It Fn localcount_drain "lc" "cv" "mtx"
.Pp
-Wait for all references to the
-.Nm
+Wait for all references to the localcount
+.Ar lc
to be released.
The caller must hold the mutex
.Ar mtx ;
Home |
Main Index |
Thread Index |
Old Index