Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
f619c7ea
提交
f619c7ea
3月 29, 2012
创建
作者:
Silas Boyd-Wickizer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use wqalloc for dirit
上级
323d260b
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
10 行增加
和
10 行删除
+10
-10
xls.cc
bin/xls.cc
+1
-1
dirit.hh
include/dirit.hh
+3
-3
wq.hh
include/wq.hh
+4
-4
wqalloc.cc
lib/wqalloc.cc
+2
-2
没有找到文件。
bin/xls.cc
浏览文件 @
f619c7ea
...
...
@@ -22,8 +22,8 @@
#include "user.h"
#include "fs.h"
#include "lib.h"
#include "dirit.hh"
#include "wq.hh"
#include "dirit.hh"
#define ST_SIZE(st) (st).size
#define ST_TYPE(st) (st).type
#define ST_INO(st) (st).ino
...
...
include/dirit.hh
浏览文件 @
f619c7ea
...
...
@@ -44,12 +44,12 @@ private:
static
inline
const
char
*
copy_value
(
dirit
&
it
)
{
char
*
buf
=
(
char
*
)
malloc
(
256
);
return
it
.
name
(
buf
,
256
);
char
*
buf
=
(
char
*
)
wqalloc
(
DIRSIZ
+
1
);
return
it
.
name
(
buf
,
DIRSIZ
+
1
);
}
static
inline
void
free_value
(
dirit
&
it
,
const
char
*
name
)
{
free
((
void
*
)
name
);
wq
free
((
void
*
)
name
);
}
include/wq.hh
浏览文件 @
f619c7ea
...
...
@@ -38,10 +38,10 @@ struct cwork : public work {
#define xallocwork(n) kmalloc(n, "xallocwork")
#define xfreework(p, sz) kmfree(p, sz)
#else
extern
void
*
allocwork
(
unsigned
long
nbytes
);
extern
void
freework
(
void
*
ptr
);
#define xallocwork(n)
allocwork
(n)
#define xfreework(n, sz)
freework
(n)
extern
void
*
wqalloc
(
unsigned
long
nbytes
);
extern
void
wqfree
(
void
*
ptr
);
#define xallocwork(n)
wqalloc
(n)
#define xfreework(n, sz)
wqfree
(n)
#endif
#include "wqfor.hh"
lib/wqalloc.cc
浏览文件 @
f619c7ea
...
...
@@ -30,7 +30,7 @@ refill(void)
}
void
*
allocwork
(
unsigned
long
nbytes
)
wqalloc
(
unsigned
long
nbytes
)
{
assert
(
nbytes
<=
WQBLOCKSZ
);
...
...
@@ -44,7 +44,7 @@ allocwork(unsigned long nbytes)
}
void
freework
(
void
*
ptr
)
wqfree
(
void
*
ptr
)
{
wqblock
*
b
=
(
wqblock
*
)
ptr
;
b
->
next
=
*
block
;
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论