Thread support library

来自cppreference.com
< c

 
 
线程的支持库
主题
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
相互排斥
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
调用一次
Original:
Call once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
条件变量
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
线程局部存储
Original:
Thread-local storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
如果宏常数__STDC_NO_THREADS__(C11)定义由编译器,头<threads.h>,此处列出的所有的名字都没有提供.
Original:
If the macro constant __STDC_NO_THREADS__(C11) is defined by the compiler, the header <threads.h> and all of the names listed here are not provided.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 主题

Defined in header <threads.h>
thrd_t
类型识别一个线程
Original:
a type identifying a thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
(C11)
创建一个线程
Original:
creates a thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
检查,如果两个标识符是指在同一个线程中
Original:
checks if two identifiers refer to the same thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
获取当前线程的标识符
Original:
obtains the current thread identifier
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
暂停执行调用的线程在给定的时间内
Original:
suspends execution of the calling thread for the given period of time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
yields the current time slice
(函数) [edit]
(C11)
终止调用线程
Original:
terminates the calling thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
分离线程
Original:
detaches a thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
块,直到某个线程终止
Original:
blocks until a thread terminates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
表示一个线程错误状态
Original:
indicates a thread error status
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(不变) [edit]
thrd_start_t
(C11)
thrd_create传递给函数指针类型
Original:
function pointer type passed to thrd_create
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(的typedef) [edit]

[编辑] 相互排斥

Defined in header <threads.h>
mtx_t
互斥对象的标识符
Original:
mutex identifier
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
(C11)
创建一个互斥
Original:
creates a mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
阻塞,直到锁定一个互斥体
Original:
blocks until locks a mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
块,直到锁定一个互斥体或超时
Original:
blocks until locks a mutex or times out
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
锁定互斥或返回,不阻塞,如果已经锁定
Original:
locks a mutex or returns without blocking if already locked
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
释放一个互斥体
Original:
unlocks a mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
销毁互斥
Original:
destroys a mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C++11)
(C++11)
(C++11)
定义一个互斥体的类型
Original:
defines the type of a mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(枚举) [edit]
调用一次
Original:
Call once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
once_flag the type of the flag used by call_once [edit]
初始化一个一个once_flag
Original:
initializes a once_flag
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变) [edit]
(C11)
调用一个函数一次
Original:
calls a function exactly once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]

[编辑] 条件变量

Defined in header <threads.h>
cnd_t
条件变量标识符
Original:
condition variable identifier
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C11)
创建一个条件变量
Original:
creates a condition variable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
解除封锁一个线程阻塞在一个条件变量
Original:
unblocks one thread blocked on a condition variable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
放开所有的条件变量阻塞的线程
Original:
unblocks all threads blocked on a condition variable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
块的条件变量
Original:
blocks on a condition variable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
在一个条件变量,超时块
Original:
blocks on a condition variable, with a timeout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
破坏一个条件变量
Original:
destroys a condition variable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]

[编辑] 线程局部存储

Defined in header <threads.h>
(C11)
线程局部类型的宏
Original:
thread local type macro
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变) [edit]
tss_t
特定于线程的存储指针
Original:
thread-specific storage pointer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
最大数量的时候析构函数被调用
Original:
maximum number of times destructors are called
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变) [edit]
tss_dtor_t function pointer type used for TSS destructor [edit]
(C11)
creates thread-specific storage pointer with a given destructor
(函数) [edit]
(C11)
读取特定于线程的存储
Original:
reads from thread-specific storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
写线程专有存储
Original:
write to thread-specific storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C11)
一个给定的特定于线程的指针释放资源
Original:
releases the resources held by a given thread-specific pointer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]