#include <linux/kernel.h>
#include <linux/sched.h>
#include <spldef.h>
#include <asm/bitops.h>
#include <system_data_cells.h>
Go to the source code of this file.
Defines | |
#define | SPINDEB |
Functions | |
int | smp_acquire (struct _spl *spl) |
acquire spinlock - see 5.2 8.3.8 | |
int | smp_restore (struct _spl *spl) |
release spinlock - see 5.2 8.3.8 | |
Variables | |
long | spin [1024] |
Definition in file spinlocks.c.
#define SPINDEB |
Definition at line 15 of file spinlocks.c.
int smp_acquire | ( | struct _spl * | spl | ) | [inline] |
acquire spinlock - see 5.2 8.3.8
lockname | ||
lockipl | -1 if no change not 100% according to spec |
remember to do a smp enabled check - MISSING
according to spec, this is really acquirel
ipl is raised before we call this, not accordig to spec
get cpu id
bbssi equivalent, set the spinlock bit
if the bit was set, the spinlock has already been acquired
compare owner cpu with the cpu id (in spec addr)
if equal, nested acquiring, increase own_cnt
if not loop in lock
if the bit was clear, this cpu now owns the lock
store cpu db id (speced address) in spinlock
increment spl own_cnt
use cpu busywait field - MISSING
use spl timo_int - MISSING
Definition at line 29 of file spinlocks.c.
References ctl_gl_pcb, spin, _spl::spl_l_own_cnt, _spl::spl_l_own_cpu, and _spl::spl_l_spinlock.
int smp_restore | ( | struct _spl * | spl | ) | [inline] |
release spinlock - see 5.2 8.3.8
lockname | ||
lockipl | -1 if no change not 100% according to spec |
remember to do a smp enabled check - MISSING
decrease spinlock owner count
if count is -1, it is now free
set owner cpu to 0
BBCCI equivalent, clear spinlock bit to free it
test for bugcheck - MISSING
Definition at line 96 of file spinlocks.c.
References _spl::spl_l_own_cnt, _spl::spl_l_own_cpu, and _spl::spl_l_spinlock.
long spin[1024] |
Definition at line 19 of file spinlocks.c.
Referenced by exe_forkdspth(), forklock(), forkunlock(), and smp_acquire().