쓰레드 지원 라이브러리
cppreference.com
< c
컴파일러가 매크로 상수 __STDC_NO_THREADS__
(C11)를 정의했다면 <threads.h>
헤더파일 및 여기에 나열된 모든 것들이 제공되지 않는다.
목차 |
[편집] 쓰레드
<threads.h> 헤더에 정의됨. | |
thrd_t
|
쓰레드를 식별하기 위한 유형 |
(C11) |
쓰레드를 생성한다 (function) |
(C11) |
checks if two identifiers refer to the same thread (function) |
(C11) |
obtains the current thread identifier (function) |
(C11) |
suspends execution of the calling thread for the given period of time (function) |
(C11) |
yields the current time slice (function) |
(C11) |
terminates the calling thread (function) |
(C11) |
detaches a thread (function) |
(C11) |
blocks until a thread terminates (function) |
indicates a thread error status (constant) | |
thrd_start_t (C11) |
function pointer type passed to thrd_create (typedef) |
[편집] 상호 배제
<threads.h> 헤더에 정의됨. | |
mtx_t
|
mutex identifier |
(C11) |
creates a mutex (function) |
(C11) |
blocks until locks a mutex (function) |
(C11) |
blocks until locks a mutex or times out (function) |
(C11) |
locks a mutex or returns without blocking if already locked (function) |
(C11) |
unlocks a mutex (function) |
(C11) |
destroys a mutex (function) |
(C++11) (C++11) (C++11) |
defines the type of a mutex (enum) |
Call once | |
(C11) |
calls a function exactly once (function) |
[편집] 조건 변수
<threads.h> 헤더에 정의됨. | |
cnd_t
|
c조건 변수 식별자 |
(C11) |
creates a condition variable (function) |
(C11) |
unblocks one thread blocked on a condition variable (function) |
(C11) |
unblocks all threads blocked on a condition variable (function) |
(C11) |
blocks on a condition variable (function) |
(C11) |
blocks on a condition variable, with a timeout (function) |
(C11) |
destroys a condition variable (function) |
[편집] 쓰레드 지역 저장소
<threads.h> 헤더에 정의됨. | |
(C11) |
thread local type macro (macro constant) |
tss_t
|
thread-specific storage pointer |
(C11) |
maximum number of times destructors are called (macro constant) |
tss_dtor_t
|
function pointer type used for TSS destructor |
(C11) |
creates thread-specific storage pointer with a given destructor (function) |
(C11) |
reads from thread-specific storage (function) |
(C11) |
write to thread-specific storage (function) |
(C11) |
releases the resources held by a given thread-specific pointer (function) |
[편집] 예약 식별자
cnd_
,mtx_
, thrd_
, tss_
로 시작하는 함수명, 형식 명, 열거형 상수.
소문자 글자들은 아마도 C 표준 향후 개정안의 <threads.h>
헤더 파일의 선언부에 추가될 것이다. 프로그램의 이식성을 고려한다면 이러한 식별자를 사용해서는 안된다.
[편집] 참고자료
- C11 standard (ISO/IEC 9899:2011):
- 7.26 Threads <threads.h> (p: 376-387)
- 7.31.15 Threads <threads.h> (p: 456)
[편집] 같이 보기
C++ documentation for 쓰레드 지원 라이브러리
|