Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
d7ee5605
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d7ee5605
编写于
6月 27, 2008
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'core/debugobjects' into core/urgent
上级
1b7558e4
50db04dd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
9 deletion
+6
-9
lib/debugobjects.c
lib/debugobjects.c
+6
-9
未找到文件。
lib/debugobjects.c
浏览文件 @
d7ee5605
...
...
@@ -68,6 +68,7 @@ static int fill_pool(void)
{
gfp_t
gfp
=
GFP_ATOMIC
|
__GFP_NORETRY
|
__GFP_NOWARN
;
struct
debug_obj
*
new
;
unsigned
long
flags
;
if
(
likely
(
obj_pool_free
>=
ODEBUG_POOL_MIN_LEVEL
))
return
obj_pool_free
;
...
...
@@ -81,10 +82,10 @@ static int fill_pool(void)
if
(
!
new
)
return
obj_pool_free
;
spin_lock
(
&
pool_lock
);
spin_lock
_irqsave
(
&
pool_lock
,
flags
);
hlist_add_head
(
&
new
->
node
,
&
obj_pool
);
obj_pool_free
++
;
spin_unlock
(
&
pool_lock
);
spin_unlock
_irqrestore
(
&
pool_lock
,
flags
);
}
return
obj_pool_free
;
}
...
...
@@ -110,16 +111,13 @@ static struct debug_obj *lookup_object(void *addr, struct debug_bucket *b)
}
/*
* Allocate a new object. If the pool is empty and no refill possible,
* switch off the debugger.
* Allocate a new object. If the pool is empty, switch off the debugger.
*/
static
struct
debug_obj
*
alloc_object
(
void
*
addr
,
struct
debug_bucket
*
b
,
struct
debug_obj_descr
*
descr
)
{
struct
debug_obj
*
obj
=
NULL
;
int
retry
=
0
;
repeat:
spin_lock
(
&
pool_lock
);
if
(
obj_pool
.
first
)
{
obj
=
hlist_entry
(
obj_pool
.
first
,
typeof
(
*
obj
),
node
);
...
...
@@ -141,9 +139,6 @@ alloc_object(void *addr, struct debug_bucket *b, struct debug_obj_descr *descr)
}
spin_unlock
(
&
pool_lock
);
if
(
fill_pool
()
&&
!
obj
&&
!
retry
++
)
goto
repeat
;
return
obj
;
}
...
...
@@ -261,6 +256,8 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
struct
debug_obj
*
obj
;
unsigned
long
flags
;
fill_pool
();
db
=
get_bucket
((
unsigned
long
)
addr
);
spin_lock_irqsave
(
&
db
->
lock
,
flags
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录