sys/src/internals.h File Reference

#include <ipl.h>
#include <spldef.h>

Go to the source code of this file.

Defines

#define VMSLOCK_DEBUG

Functions

void qhead_init (void *l)
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 locki
long locks [1024]


Define Documentation

#define VMSLOCK_DEBUG

Definition at line 5 of file internals.h.


Function Documentation

void qhead_init ( void *  l  ) 

int smp_acquire ( struct _spl spl  )  [inline]

acquire spinlock - see 5.2 8.3.8

Parameters:
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

Parameters:
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.


Variable Documentation

long locki

long locks[1024]


Generated on Fri Oct 9 10:26:01 2009 for FreeVMS by  doxygen 1.5.5