std:: sig_atomic_t
From cppreference.net
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program support utilities
| Program termination | |||||||||||||||||||||
|
|||||||||||||||||||||
| Unreachable control flow | |||||||||||||||||||||
|
(C++23)
|
|||||||||||||||||||||
| Communicating with the environment | |||||||||||||||||||||
| Signals | |||||||||||||||||||||
| Signal types | |||||||||||||||||||||
| Non-local jumps | |||||||||||||||||||||
| Types | |||||||||||||||||||||
|
定义于头文件
<csignal>
|
||
|
typedef
/* 未指定 */
sig_atomic_t
;
|
||
一种整数类型,即使在信号引起的异步中断存在的情况下,也能作为原子实体进行访问。
注释
在C++11引入 std::atomic 和 std::atomic_signal_fence 之前,严格符合标准的程序在信号处理程序中唯一能执行的操作就是为 volatile static std :: sig_atomic_t 变量赋值并立即返回。
参见
|
为特定信号设置信号处理程序
(函数) |
|
|
(C++11)
|
同一线程内线程与信号处理程序之间的栅栏
(函数) |
|
C 文档
关于
sig_atomic_t
|
|