diff options
author | ru <ru@FreeBSD.org> | 2004-07-02 23:52:20 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-07-02 23:52:20 +0000 |
commit | 01548ace1533487f9c0488f55112c9d8641f8184 (patch) | |
tree | 23294a96f715e1e5bc35c1029ec151c90ee95b96 /lib/libc/gen/dllockinit.3 | |
parent | 47f5e31e2bb626743fa9e912918201fe505b1419 (diff) | |
download | FreeBSD-src-01548ace1533487f9c0488f55112c9d8641f8184.zip FreeBSD-src-01548ace1533487f9c0488f55112c9d8641f8184.tar.gz |
Mechanically kill hard sentence breaks.
Diffstat (limited to 'lib/libc/gen/dllockinit.3')
-rw-r--r-- | lib/libc/gen/dllockinit.3 | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/lib/libc/gen/dllockinit.3 b/lib/libc/gen/dllockinit.3 index 6af2cf7..98d1074 100644 --- a/lib/libc/gen/dllockinit.3 +++ b/lib/libc/gen/dllockinit.3 @@ -40,22 +40,26 @@ .Sh DESCRIPTION .Bf Sy Due to enhancements in the dynamic linker, this interface is no longer -needed. It is deprecated and will be removed from future releases. +needed. +It is deprecated and will be removed from future releases. In current releases it still exists, but only as a stub which does nothing. .Ef .Pp Threads packages can call .Fn dllockinit at initialization time to register locking functions for the dynamic -linker to use. This enables the dynamic linker to prevent multiple +linker to use. +This enables the dynamic linker to prevent multiple threads from entering its critical sections simultaneously. .Pp The .Fa context -argument specifies an opaque context for creating locks. The +argument specifies an opaque context for creating locks. +The dynamic linker will pass it to the .Fa lock_create -function when creating the locks it needs. When the dynamic linker +function when creating the locks it needs. +When the dynamic linker is permanently finished using the locking functions (e.g., if the program makes a subsequent call to .Fn dllockinit @@ -65,7 +69,8 @@ to destroy the context. .Pp The .Fa lock_create -argument specifies a function for creating a read/write lock. It +argument specifies a function for creating a read/write lock. +It must return a pointer to the new lock. .Pp The @@ -73,18 +78,23 @@ The and .Fa wlock_acquire arguments specify functions which lock a lock for reading or -writing, respectively. The +writing, respectively. +The .Fa lock_release -argument specifies a function which unlocks a lock. Each of these +argument specifies a function which unlocks a lock. +Each of these functions is passed a pointer to the lock. .Pp The .Fa lock_destroy -argument specifies a function to destroy a lock. It may be +argument specifies a function to destroy a lock. +It may be .Dv NULL -if locks do not need to be destroyed. The +if locks do not need to be destroyed. +The .Fa context_destroy -argument specifies a function to destroy the context. It may be +argument specifies a function to destroy the context. +It may be .Dv NULL if the context does not need to be destroyed. .Pp @@ -96,9 +106,11 @@ a default locking mechanism which works by blocking the .Dv SIGPROF , and .Dv SIGALRM -signals. This is sufficient for many application level threads +signals. +This is sufficient for many application level threads packages, which typically use one of these signals to implement -preemption. An application which has registered its own locking +preemption. +An application which has registered its own locking methods with .Fn dllockinit can restore the default locking by calling |