提交 f2621b2d 创建 作者: Silas Boyd-Wickizer's avatar Silas Boyd-Wickizer

Add subfetch and idup to kernel.h

上级 7518773e
...@@ -14,6 +14,7 @@ static inline void *p2v(uptr a) { return (void *) a + KBASE; } ...@@ -14,6 +14,7 @@ static inline void *p2v(uptr a) { return (void *) a + KBASE; }
#define NELEM(x) (sizeof(x)/sizeof((x)[0])) #define NELEM(x) (sizeof(x)/sizeof((x)[0]))
#define cmpswap(ptr, old, new) __sync_bool_compare_and_swap(ptr, old, new) #define cmpswap(ptr, old, new) __sync_bool_compare_and_swap(ptr, old, new)
#define subfetch(ptr, val) __sync_sub_and_fetch(ptr, val)
struct spinlock; struct spinlock;
struct condvar; struct condvar;
...@@ -66,6 +67,7 @@ void iunlock(struct inode*); ...@@ -66,6 +67,7 @@ void iunlock(struct inode*);
int readi(struct inode*, char*, u32, u32); int readi(struct inode*, char*, u32, u32);
void stati(struct inode*, struct stat*); void stati(struct inode*, struct stat*);
int writei(struct inode*, char*, u32, u32); int writei(struct inode*, char*, u32, u32);
struct inode* idup(struct inode*);
// ide.c // ide.c
void ideinit(void); void ideinit(void);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论