diff options
author | kaashoek <kaashoek> | 2006-07-06 21:47:22 +0000 |
---|---|---|
committer | kaashoek <kaashoek> | 2006-07-06 21:47:22 +0000 |
commit | 7837c71b32fc716101a859302e0349061416bd6e (patch) | |
tree | 57ec72178b980a3cd794b2f93bd021e08004368f /main.c | |
parent | b22d898297a2496ba4cfd31d445769fbebc0a46d (diff) | |
download | xv6-labs-7837c71b32fc716101a859302e0349061416bd6e.tar.gz xv6-labs-7837c71b32fc716101a859302e0349061416bd6e.tar.bz2 xv6-labs-7837c71b32fc716101a859302e0349061416bd6e.zip |
disable all interrupts when acquiring lock
user program that makes a blocking system call
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -13,6 +13,7 @@ extern char edata[], end[]; extern int acpu; extern char _binary_user1_start[], _binary_user1_size[]; extern char _binary_usertests_start[], _binary_usertests_size[]; +extern char _binary_userfs_start[], _binary_userfs_size[]; char buf[512]; @@ -59,20 +60,16 @@ main() p->ppid = 0; setupsegs(p); + // become interruptable write_eflags(read_eflags() | FL_IF); - // turn on interrupts on boot processor + // turn on timer and enable interrupts on the local APIC lapic_timerinit(); lapic_enableintr(); -#if 0 - ide_init(); - ide_read(0, buf, 1); - cprintf("sec0.0 %x\n", buf[0] & 0xff); -#endif - p = newproc(); - load_icode(p, _binary_usertests_start, (unsigned) _binary_usertests_size); + // load_icode(p, _binary_usertests_start, (unsigned) _binary_usertests_size); + load_icode(p, _binary_userfs_start, (unsigned) _binary_userfs_size); swtch(); |