Unix and Linux Discussions Tagged with linker |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
14,310 |
AIX |
|
|
|
7 |
4,424 |
UNIX for Beginners Questions & Answers |
|
|
|
7 |
2,841 |
Programming |
|
|
|
1 |
2,089 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
3,218 |
AIX |
|
|
|
2 |
2,388 |
Programming |
|
|
|
4 |
7,230 |
Programming |
|
|
|
5 |
2,403 |
Shell Programming and Scripting |
|
|
|
1 |
2,166 |
Programming |
|
|
|
12 |
5,680 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,193 |
Programming |
|
|
|
2 |
2,125 |
Programming |
|
|
|
5 |
2,750 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
81,242 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,019 |
UNIX for Dummies Questions & Answers |
|
|
|
18 |
13,454 |
Shell Programming and Scripting |
|
|
|
2 |
2,931 |
Programming |
|
|
|
4 |
2,394 |
Shell Programming and Scripting |
|
|
|
3 |
3,182 |
SCO |
|
|
|
0 |
9,124 |
Programming |
|
|
|
0 |
3,307 |
UNIX for Advanced & Expert Users |
|
|
|
6 |
8,776 |
HP-UX |
|
|
|
1 |
6,002 |
Programming |
|
|
|
2 |
2,848 |
Programming |
|
|
|
9 |
6,652 |
Programming |
|
|
|
2 |
16,458 |
BSD |
|
|
|
15 |
15,084 |
Proxy Server |
|
|
|
5 |
7,279 |
Programming |
|
|
|
2 |
3,587 |
Red Hat |
|
|
|
4 |
9,597 |
Programming |
|
|
|
7 |
3,450 |
Shell Programming and Scripting |
|
|
|
30 |
13,134 |
Programming |
|
|
|
8 |
12,158 |
Programming |
|
|
|
14 |
6,339 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
4,894 |
Programming |
|
|
|
3 |
7,649 |
Solaris |
|
|
|
15 |
5,577 |
UNIX for Advanced & Expert Users |
|
|
|
7 |
11,021 |
Programming |
|
|
|
11 |
7,946 |
SuSE |
|
|
|
5 |
3,694 |
Programming |
DLLOCKINIT(3) BSD Library Functions Manual DLLOCKINIT(3)
NAME
dllockinit -- register thread locking methods with the dynamic linker
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <dlfcn.h>
void
dllockinit(void *context, void *(*lock_create)(void *context), void (*rlock_acquire)(void *lock), void (*wlock_acquire)(void *lock),
void (*lock_release)(void *lock), void (*lock_destroy)(void *lock), void (*context_destroy)(void *context));
DESCRIPTION
Due to enhancements in the dynamic linker, this interface is no longer 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.
Threads packages can call dllockinit() at initialization time to register locking functions for the dynamic linker to use. This enables the
dynamic linker to prevent multiple threads from entering its critical sections simultaneously.
The context argument specifies an opaque context for creating locks. The dynamic linker will pass it to the lock_create function when creat-
ing 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 dllockinit() to register new locking functions) it will call context_destroy to destroy the context.
The lock_create argument specifies a function for creating a read/write lock. It must return a pointer to the new lock.
The rlock_acquire and wlock_acquire arguments specify functions which lock a lock for reading or writing, respectively. The lock_release
argument specifies a function which unlocks a lock. Each of these functions is passed a pointer to the lock.
The lock_destroy argument specifies a function to destroy a lock. It may be NULL if locks do not need to be destroyed. The context_destroy
argument specifies a function to destroy the context. It may be NULL if the context does not need to be destroyed.
Until dllockinit() is called, the dynamic linker protects its critical sections using a default locking mechanism which works by blocking the
SIGVTALRM, SIGPROF, and SIGALRM 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 methods with dllockinit() can restore the default lock-
ing by calling dllockinit() with all arguments NULL.
SEE ALSO
rtld(1), signal(3)
HISTORY
The dllockinit() function first appeared in FreeBSD 4.0.
BSD
July 5, 2000 BSD