Skip to content
Snippets Groups Projects
Commit ab4cedb5 authored by rtm's avatar rtm
Browse files

continuous quality management

parent ef218524
No related branches found
No related tags found
No related merge requests found
//
// macros to create x86 segments from assembler
// assembler macros to create x86 segments
//
#define SEG_NULLASM \
......
......@@ -20,8 +20,8 @@ initlock(struct spinlock *lock, char *name)
// Acquire the lock.
// Loops (spins) until the lock is acquired.
// (Because contention is handled by spinning,
// must not go to sleep holding any locks.)
// Holding a lock for a long time may cause
// other CPUs to waste time spinning to acquire it.
void
acquire(struct spinlock *lock)
{
......
// Special assembly routines to access x86-specific
// hardware instructions.
// Routines to let C code use special x86 instructions.
static inline uchar
inb(ushort port)
......@@ -131,7 +130,8 @@ sti(void)
asm volatile("sti");
}
// Layout of the trap frame on the stack upon entry to trap.
// Layout of the trap frame built on the stack by the
// hardware and by trapasm.S, and passed to trap().
struct trapframe {
// registers as pushed by pusha
uint edi;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment