Xv6 with picoc & Linkage editor
v1.0
The project delineate mutual cohesion between c library, linkage editor ( linker), interpreter and operating system by porting the same on xv6 kernel
|
00001 // Mutual exclusion lock. 00002 struct spinlock { 00003 uint locked; // Is the lock held? 00004 00005 // For debugging: 00006 char *name; // Name of lock. 00007 struct cpu *cpu; // The cpu holding the lock. 00008 uint pcs[10]; // The call stack (an array of program counters) 00009 // that locked the lock. 00010 }; 00011