#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) |
| void acquire | ( | struct spinlock * | lk | ) |
Definition at line 24 of file spinlock.c.
References spinlock::cpu, getcallerpcs(), holding(), spinlock::locked, panic(), spinlock::pcs, pushcli(), and xchg().
Referenced by allocproc(), bget(), brelse(), consoleintr(), consoleread(), consolewrite(), cprintf(), exit(), filealloc(), fileclose(), filedup(), ideintr(), iderw(), idup(), iget(), ilock(), iput(), iunlock(), kalloc(), kfree(), kill(), pipeclose(), piperead(), pipewrite(), scheduler(), sleep(), sys_sleep(), trap(), wait(), wakeup(), and yield().
| void getcallerpcs | ( | void * | v, | |
| uint | pcs[] | |||
| ) |
Definition at line 67 of file spinlock.c.
| int holding | ( | struct spinlock * | lock | ) |
| void initlock | ( | struct spinlock * | lk, | |
| char * | name | |||
| ) |
Definition at line 12 of file spinlock.c.
References spinlock::cpu, spinlock::locked, and spinlock::name.
Referenced by binit(), consoleinit(), fileinit(), ideinit(), iinit(), kinit(), pinit(), pipealloc(), and tvinit().
| 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 | ) |
Definition at line 43 of file spinlock.c.
References spinlock::cpu, holding(), spinlock::locked, panic(), spinlock::pcs, popcli(), and xchg().
Referenced by allocproc(), bget(), brelse(), consoleintr(), consoleread(), consolewrite(), cprintf(), filealloc(), fileclose(), filedup(), forkret(), ideintr(), iderw(), idup(), iget(), ilock(), iput(), iunlock(), kalloc(), kfree(), kill(), pipeclose(), piperead(), pipewrite(), scheduler(), sleep(), sys_sleep(), trap(), wait(), wakeup(), and yield().
1.5.6