提交 d215683d 创建 作者: Frans Kaashoek's avatar Frans Kaashoek

Copy lastest user-level version into kernel before C++ changes

上级 b4fd7343
差异被折叠。
...@@ -57,25 +57,23 @@ void consoleintr(int(*)(void)); ...@@ -57,25 +57,23 @@ void consoleintr(int(*)(void));
// crange.c // crange.c
struct clist_range { struct range {
u64 key; u64 key;
u64 size; u64 size;
void *value; void *value;
int curlevel; int curlevel; // the current levels it appears on
int nlevel; int nlevel; // the number of levels this range should appear
struct crange *cr; struct crange *cr; // the crange this range is part of
struct clist_range** next; // one next pointer per level struct range** next; // one next pointer per level
struct spinlock *lock; // on separate cache line? struct spinlock *lock; // on separate cache line?
} __mpalign__; } __mpalign__;
struct crange;
struct crange* crange_alloc(int nlevel); struct crange* crange_alloc(int nlevel);
void crange_free(struct crange *cr); void crange_free(struct crange *cr);
void crange_del(struct crange *cr, u64 k, u64 sz); void crange_del(struct crange *cr, u64 k, u64 sz);
void crange_add(struct crange *cr, u64 k, u64 sz, void *v); void crange_add(struct crange *cr, u64 k, u64 sz, void *v);
struct clist_range* crange_search(struct crange *cr, u64 k, u64 sz); struct range* crange_search(struct crange *cr, u64 k, u64 sz, int mod);
int crange_foreach(struct crange *crk, int (*f)(struct clist_range *r, void *st), void *st); int crange_foreach(struct crange *crk, int (*f)(struct range *r, void *st), void *st);
void crange_print(struct crange *cr, int); void crange_print(struct crange *cr, int);
// e1000.c // e1000.c
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论