Straight replacement of B_BUSY with a sleeping lock.

This commit is contained in:
Frans Kaashoek 2016-09-11 17:24:04 -04:00
parent 551c2f3576
commit 6670d3b5e0
8 changed files with 45 additions and 21 deletions

7
defs.h
View file

@ -6,6 +6,7 @@ struct pipe;
struct proc;
struct rtcdate;
struct spinlock;
struct sleeplock;
struct stat;
struct superblock;
@ -128,6 +129,12 @@ void release(struct spinlock*);
void pushcli(void);
void popcli(void);
// sleeplock.c
void acquiresleep(struct sleeplock*);
void releasesleep(struct sleeplock*);
int holdingsleep(struct sleeplock*);
void initsleeplock(struct sleeplock*, char*);
// string.c
int memcmp(const void*, const void*, uint);
void* memmove(void*, const void*, uint);