xv6/spinlock.c File Reference

#include "types.h"
#include "defs.h"
#include "param.h"
#include "x86.h"
#include "mmu.h"
#include "proc.h"
#include "spinlock.h"

Go to the source code of this file.

Functions

void initlock (struct spinlock *lk, char *name)
void acquire (struct spinlock *lk)
void release (struct spinlock *lk)
void getcallerpcs (void *v, uint pcs[])
int holding (struct spinlock *lock)
void pushcli (void)
void popcli (void)


Function Documentation

void acquire ( struct spinlock lk  ) 

void getcallerpcs ( void *  v,
uint  pcs[] 
)

Definition at line 67 of file spinlock.c.

int holding ( struct spinlock lock  ) 

Definition at line 85 of file spinlock.c.

References spinlock::cpu, and spinlock::locked.

Referenced by acquire(), release(), and sched().

void initlock ( struct spinlock lk,
char *  name 
)

void popcli ( void   ) 

Definition at line 107 of file spinlock.c.

References FL_IF, panic(), readeflags(), and sti().

Referenced by release(), and usegment().

void pushcli ( void   ) 

Definition at line 96 of file spinlock.c.

References cli(), FL_IF, and readeflags().

Referenced by acquire(), and usegment().

void release ( struct spinlock lk  ) 


Generated on Fri Jan 7 12:25:49 2011 for xv6 by  doxygen 1.5.6