#include <unistd.h>

Go to the source code of this file.
Defines | |
| #define | init_lock(l) (l)=0 |
| #define | sched_yield() sleep(0) |
Typedefs | |
| typedef volatile int | fl_lock_t |
Functions | |
| static void | get_lock (fl_lock_t *lock) |
| Set a lock. | |
| static void | release_lock (fl_lock_t *lock) |
| Release a lock. | |
| static int | tsl (fl_lock_t *lock) |
| Test and set a lock. Used by the get_lock function. | |
Contains the assembler routines for the fast architecture dependend locking primitives used by the server. This routines are needed e.g. to protect shared data structures that are accessed from muliple processes.
Definition in file fastlock.h.
| #define init_lock | ( | l | ) | (l)=0 |
Initialize a lock, zero is unlocked.
Definition at line 63 of file fastlock.h.
| #define sched_yield | ( | ) | sleep(0) |
Fake sched_yield if no unistd.h include is available
Definition at line 56 of file fastlock.h.
Referenced by get_lock().
| typedef volatile int fl_lock_t |
The actual lock
Definition at line 60 of file fastlock.h.
| static void get_lock | ( | fl_lock_t * | lock | ) | [inline, static] |
Set a lock.
| lock | the lock that should be set |
Definition at line 172 of file fastlock.h.
References sched_yield, and tsl().
Referenced by destroy_linkers(), get_profile_size(), link_dlg_profile(), and mi_profile_list().
| static void release_lock | ( | fl_lock_t * | lock | ) | [inline, static] |
Release a lock.
| lock | the lock that should be released |
Definition at line 194 of file fastlock.h.
Referenced by destroy_linkers(), get_profile_size(), link_dlg_profile(), and mi_profile_list().
| static int tsl | ( | fl_lock_t * | lock | ) | [inline, static] |
Test and set a lock. Used by the get_lock function.
| lock | the lock that should be set |
Definition at line 73 of file fastlock.h.
Referenced by get_lock().
1.5.6