Deleted Added
full compact
dllockinit.3 (108030) dllockinit.3 (108087)
1.\"
2.\" Copyright (c) 1999, 2000 John D. Polstra
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.\"
2.\" Copyright (c) 1999, 2000 John D. Polstra
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/lib/libc/gen/dllockinit.3 108030 2002-12-18 10:13:54Z ru $
26.\" $FreeBSD: head/lib/libc/gen/dllockinit.3 108087 2002-12-19 09:40:28Z ru $
27.\"
28.Dd July 5, 2000
29.Os
30.Dt DLLOCKINIT 3
31.Sh NAME
32.Nm dllockinit
33.Nd register thread locking methods with the dynamic linker
34.Sh LIBRARY

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

47Threads packages can call
48.Fn dllockinit
49at initialization time to register locking functions for the dynamic
50linker to use. This enables the dynamic linker to prevent multiple
51threads from entering its critical sections simultaneously.
52.Pp
53The
54.Fa context
27.\"
28.Dd July 5, 2000
29.Os
30.Dt DLLOCKINIT 3
31.Sh NAME
32.Nm dllockinit
33.Nd register thread locking methods with the dynamic linker
34.Sh LIBRARY

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

47Threads packages can call
48.Fn dllockinit
49at initialization time to register locking functions for the dynamic
50linker to use. This enables the dynamic linker to prevent multiple
51threads from entering its critical sections simultaneously.
52.Pp
53The
54.Fa context
55parameter specifies an opaque context for creating locks. The
55argument specifies an opaque context for creating locks. The
56dynamic linker will pass it to the
57.Fa lock_create
58function when creating the locks it needs. When the dynamic linker
59is permanently finished using the locking functions (e.g., if the
60program makes a subsequent call to
61.Fn dllockinit
62to register new locking functions) it will call
63.Fa context_destroy
64to destroy the context.
65.Pp
66The
67.Fa lock_create
56dynamic linker will pass it to the
57.Fa lock_create
58function when creating the locks it needs. When the dynamic linker
59is permanently finished using the locking functions (e.g., if the
60program makes a subsequent call to
61.Fn dllockinit
62to register new locking functions) it will call
63.Fa context_destroy
64to destroy the context.
65.Pp
66The
67.Fa lock_create
68parameter specifies a function for creating a read/write lock. It
68argument specifies a function for creating a read/write lock. It
69must return a pointer to the new lock.
70.Pp
71The
72.Fa rlock_acquire
73and
74.Fa wlock_acquire
69must return a pointer to the new lock.
70.Pp
71The
72.Fa rlock_acquire
73and
74.Fa wlock_acquire
75parameters specify functions which lock a lock for reading or
75arguments specify functions which lock a lock for reading or
76writing, respectively. The
77.Fa lock_release
76writing, respectively. The
77.Fa lock_release
78parameter specifies a function which unlocks a lock. Each of these
78argument specifies a function which unlocks a lock. Each of these
79functions is passed a pointer to the lock.
80.Pp
81The
82.Fa lock_destroy
79functions is passed a pointer to the lock.
80.Pp
81The
82.Fa lock_destroy
83parameter specifies a function to destroy a lock. It may be
83argument specifies a function to destroy a lock. It may be
84.Dv NULL
85if locks do not need to be destroyed. The
86.Fa context_destroy
84.Dv NULL
85if locks do not need to be destroyed. The
86.Fa context_destroy
87parameter specifies a function to destroy the context. It may be
87argument specifies a function to destroy the context. It may be
88.Dv NULL
89if the context does not need to be destroyed.
90.Pp
91Until
92.Fn dllockinit
93is called, the dynamic linker protects its critical sections using
94a default locking mechanism which works by blocking the
95.Dv SIGVTALRM ,

--- 20 unchanged lines hidden ---
88.Dv NULL
89if the context does not need to be destroyed.
90.Pp
91Until
92.Fn dllockinit
93is called, the dynamic linker protects its critical sections using
94a default locking mechanism which works by blocking the
95.Dv SIGVTALRM ,

--- 20 unchanged lines hidden ---