# HG changeset patch # User Shinji KONO # Date 1657176885 -32400 # Node ID 6cf2a3e7cca2122150a345035b0fea3791fb992b # Parent 735c804f890e0f66c92ddd0d475ecfacbbe45662 fix void * and volatile diff -r 735c804f890e -r 6cf2a3e7cca2 src/bio.c --- a/src/bio.c Thu Jul 07 15:38:55 2022 +0900 +++ b/src/bio.c Thu Jul 07 15:54:45 2022 +0900 @@ -74,7 +74,7 @@ return b; } - sleep(b, &bcache.lock); + sleep((void*)b, &bcache.lock); goto loop; } } @@ -136,7 +136,7 @@ bcache.head.next = b; b->flags &= ~B_BUSY; - wakeup(b); + wakeup((void*)b); release(&bcache.lock); } diff -r 735c804f890e -r 6cf2a3e7cca2 src/defs.h --- a/src/defs.h Thu Jul 07 15:38:55 2022 +0900 +++ b/src/defs.h Thu Jul 07 15:54:45 2022 +0900 @@ -131,10 +131,10 @@ void procdump(void); void scheduler(void) __attribute__((noreturn)); void sched(void); -void sleep(struct buf *, struct spinlock*); +void sleep(void *, struct spinlock*); void userinit(void); int wait(void); -void wakeup(struct buf *); +void wakeup(vid *); void yield(void); // swtch.S diff -r 735c804f890e -r 6cf2a3e7cca2 src/fs.c --- a/src/fs.c Thu Jul 07 15:38:55 2022 +0900 +++ b/src/fs.c Thu Jul 07 15:54:45 2022 +0900 @@ -284,7 +284,7 @@ acquire(&icache.lock); while (ip->flags & I_BUSY) { - sleep(ip, &icache.lock); + sleep((void*)ip, &icache.lock); } ip->flags |= I_BUSY; @@ -319,7 +319,7 @@ acquire(&icache.lock); ip->flags &= ~I_BUSY; - wakeup(ip); + wakeup((void*)ip); release(&icache.lock); } @@ -346,7 +346,7 @@ acquire(&icache.lock); ip->flags = 0; - wakeup(ip); + wakeup((void*)ip); } ip->ref--;