Deleted Added
full compact
rmlock.9 (212112) rmlock.9 (227588)
1.\" Copyright (c) 2007 Stephan Uphoff <ups@FreeBSD.org>
2.\" Copyright (c) 2006 Gleb Smirnoff <glebius@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
1.\" Copyright (c) 2007 Stephan Uphoff <ups@FreeBSD.org>
2.\" Copyright (c) 2006 Gleb Smirnoff <glebius@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/share/man/man9/rmlock.9 212112 2010-09-01 19:50:03Z mlaier $
26.\" $FreeBSD: head/share/man/man9/rmlock.9 227588 2011-11-16 21:51:17Z pjd $
27.\"
28.\" Based on rwlock.9 man page
27.\"
28.\" Based on rwlock.9 man page
29.Dd November 10, 2007
29.Dd November 16, 2011
30.Dt RMLOCK 9
31.Os
32.Sh NAME
33.Nm rmlock ,
34.Nm rm_init ,
35.Nm rm_init_flags ,
36.Nm rm_destroy ,
37.Nm rm_rlock ,

--- 20 unchanged lines hidden (view full) ---

58.Fn rm_try_rlock "struct rmlock *rm" "struct rm_priotracker* tracker"
59.Ft void
60.Fn rm_wlock "struct rmlock *rm"
61.Ft void
62.Fn rm_runlock "struct rmlock *rm" "struct rm_priotracker* tracker"
63.Ft void
64.Fn rm_wunlock "struct rmlock *rm"
65.Ft int
30.Dt RMLOCK 9
31.Os
32.Sh NAME
33.Nm rmlock ,
34.Nm rm_init ,
35.Nm rm_init_flags ,
36.Nm rm_destroy ,
37.Nm rm_rlock ,

--- 20 unchanged lines hidden (view full) ---

58.Fn rm_try_rlock "struct rmlock *rm" "struct rm_priotracker* tracker"
59.Ft void
60.Fn rm_wlock "struct rmlock *rm"
61.Ft void
62.Fn rm_runlock "struct rmlock *rm" "struct rm_priotracker* tracker"
63.Ft void
64.Fn rm_wunlock "struct rmlock *rm"
65.Ft int
66.Fn rm_wowned "struct rmlock *rm"
66.Fn rm_wowned "const struct rmlock *rm"
67.In sys/kernel.h
68.Fn RM_SYSINIT "name" "struct rmlock *rm" "const char *desc" "int opts"
69.Sh DESCRIPTION
70Mostly reader locks allow shared access to protected data by multiple threads,
71or exclusive access by a single thread.
72The threads with shared access are known as
73.Em readers
74since they only read the protected data.

--- 128 unchanged lines hidden (view full) ---

203This function releases an exclusive lock previously acquired by
204.Fn rm_wlock .
205.It Fn rm_destroy "struct rmlock *rm"
206This functions destroys a lock previously initialized with
207.Fn rm_init .
208The
209.Fa rm
210lock must be unlocked.
67.In sys/kernel.h
68.Fn RM_SYSINIT "name" "struct rmlock *rm" "const char *desc" "int opts"
69.Sh DESCRIPTION
70Mostly reader locks allow shared access to protected data by multiple threads,
71or exclusive access by a single thread.
72The threads with shared access are known as
73.Em readers
74since they only read the protected data.

--- 128 unchanged lines hidden (view full) ---

203This function releases an exclusive lock previously acquired by
204.Fn rm_wlock .
205.It Fn rm_destroy "struct rmlock *rm"
206This functions destroys a lock previously initialized with
207.Fn rm_init .
208The
209.Fa rm
210lock must be unlocked.
211.It Fn rm_wowned "struct rmlock *rm"
211.It Fn rm_wowned "const struct rmlock *rm"
212This function returns a non-zero value if the current thread owns an
213exclusive lock on
214.Fa rm .
215.El
216.Sh SEE ALSO
217.Xr locking 9 ,
218.Xr mutex 9 ,
219.Xr panic 9 ,

--- 37 unchanged lines hidden ---
212This function returns a non-zero value if the current thread owns an
213exclusive lock on
214.Fa rm .
215.El
216.Sh SEE ALSO
217.Xr locking 9 ,
218.Xr mutex 9 ,
219.Xr panic 9 ,

--- 37 unchanged lines hidden ---