Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
a7dbcf5c
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
大约 1 年 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a7dbcf5c
编写于
12月 13, 2013
作者:
R
Rich Felker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use 0 instead of NULL for null pointer constants
and thereby remove otherwise-unnecessary inclusion of stddef.h
上级
57174444
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
8 addition
and
15 deletion
+8
-15
src/signal/sighold.c
src/signal/sighold.c
+1
-2
src/signal/sigignore.c
src/signal/sigignore.c
+1
-2
src/signal/siginterrupt.c
src/signal/siginterrupt.c
+2
-3
src/signal/sigrelse.c
src/signal/sigrelse.c
+1
-2
src/signal/sigset.c
src/signal/sigset.c
+1
-2
src/signal/sigwait.c
src/signal/sigwait.c
+1
-2
src/signal/sigwaitinfo.c
src/signal/sigwaitinfo.c
+1
-2
未找到文件。
src/signal/sighold.c
浏览文件 @
a7dbcf5c
#include <signal.h>
#include <stddef.h>
int
sighold
(
int
sig
)
{
...
...
@@ -7,5 +6,5 @@ int sighold(int sig)
sigemptyset
(
&
mask
);
if
(
sigaddset
(
&
mask
,
sig
)
<
0
)
return
-
1
;
return
sigprocmask
(
SIG_BLOCK
,
&
mask
,
NULL
);
return
sigprocmask
(
SIG_BLOCK
,
&
mask
,
0
);
}
src/signal/sigignore.c
浏览文件 @
a7dbcf5c
#include <signal.h>
#include <stddef.h>
int
sigignore
(
int
sig
)
{
...
...
@@ -8,5 +7,5 @@ int sigignore(int sig)
sigemptyset
(
&
sa
.
sa_mask
);
sa
.
sa_handler
=
SIG_IGN
;
sa
.
sa_flags
=
0
;
return
sigaction
(
sig
,
&
sa
,
NULL
);
return
sigaction
(
sig
,
&
sa
,
0
);
}
src/signal/siginterrupt.c
浏览文件 @
a7dbcf5c
#include <stddef.h>
#include <signal.h>
int
siginterrupt
(
int
sig
,
int
flag
)
{
struct
sigaction
sa
;
sigaction
(
sig
,
NULL
,
&
sa
);
sigaction
(
sig
,
0
,
&
sa
);
if
(
flag
)
sa
.
sa_flags
&=
~
SA_RESTART
;
else
sa
.
sa_flags
|=
SA_RESTART
;
return
sigaction
(
sig
,
&
sa
,
NULL
);
return
sigaction
(
sig
,
&
sa
,
0
);
}
src/signal/sigrelse.c
浏览文件 @
a7dbcf5c
#include <signal.h>
#include <stddef.h>
int
sigrelse
(
int
sig
)
{
...
...
@@ -7,5 +6,5 @@ int sigrelse(int sig)
sigemptyset
(
&
mask
);
if
(
sigaddset
(
&
mask
,
sig
)
<
0
)
return
-
1
;
return
sigprocmask
(
SIG_UNBLOCK
,
&
mask
,
NULL
);
return
sigprocmask
(
SIG_UNBLOCK
,
&
mask
,
0
);
}
src/signal/sigset.c
浏览文件 @
a7dbcf5c
#include <signal.h>
#include <stddef.h>
void
(
*
sigset
(
int
sig
,
void
(
*
handler
)(
int
)))(
int
)
{
...
...
@@ -11,7 +10,7 @@ void (*sigset(int sig, void (*handler)(int)))(int)
return
SIG_ERR
;
if
(
handler
==
SIG_HOLD
)
{
if
(
sigaction
(
sig
,
NULL
,
&
sa_old
)
<
0
)
if
(
sigaction
(
sig
,
0
,
&
sa_old
)
<
0
)
return
SIG_ERR
;
if
(
sigprocmask
(
SIG_BLOCK
,
&
mask
,
&
mask
)
<
0
)
return
SIG_ERR
;
...
...
src/signal/sigwait.c
浏览文件 @
a7dbcf5c
#include <signal.h>
#include <stddef.h>
int
sigwait
(
const
sigset_t
*
restrict
mask
,
int
*
restrict
sig
)
{
siginfo_t
si
;
if
(
sigtimedwait
(
mask
,
&
si
,
NULL
)
<
0
)
if
(
sigtimedwait
(
mask
,
&
si
,
0
)
<
0
)
return
-
1
;
*
sig
=
si
.
si_signo
;
return
0
;
...
...
src/signal/sigwaitinfo.c
浏览文件 @
a7dbcf5c
#include <signal.h>
#include <stddef.h>
int
sigwaitinfo
(
const
sigset_t
*
restrict
mask
,
siginfo_t
*
restrict
si
)
{
return
sigtimedwait
(
mask
,
si
,
NULL
);
return
sigtimedwait
(
mask
,
si
,
0
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录