이름공간
변수
행위

쓰레드 지원 라이브러리

cppreference.com
< c

컴파일러가 매크로 상수 __STDC_NO_THREADS__(C11)를 정의했다면 <threads.h> 헤더파일 및 여기에 나열된 모든 것들이 제공되지 않는다.

목차

[편집] 쓰레드

<threads.h> 헤더에 정의됨.
thrd_t 쓰레드를 식별하기 위한 유형 [edit]
쓰레드를 생성한다
(function) [edit]
checks if two identifiers refer to the same thread
(function) [edit]
obtains the current thread identifier
(function) [edit]
suspends execution of the calling thread for the given period of time
(function) [edit]
yields the current time slice
(function) [edit]
terminates the calling thread
(function) [edit]
detaches a thread
(function) [edit]
blocks until a thread terminates
(function) [edit]
indicates a thread error status
(constant) [edit]
thrd_start_t
(C11)
function pointer type passed to thrd_create
(typedef) [edit]

[편집] 상호 배제

<threads.h> 헤더에 정의됨.
mtx_t mutex identifier [edit]
creates a mutex
(function) [edit]
blocks until locks a mutex
(function) [edit]
blocks until locks a mutex or times out
(function) [edit]
locks a mutex or returns without blocking if already locked
(function) [edit]
unlocks a mutex
(function) [edit]
destroys a mutex
(function) [edit]
defines the type of a mutex
(enum) [edit]
Call once
calls a function exactly once
(function) [edit]

[편집] 조건 변수

<threads.h> 헤더에 정의됨.
cnd_t c조건 변수 식별자
creates a condition variable
(function) [edit]
unblocks one thread blocked on a condition variable
(function) [edit]
unblocks all threads blocked on a condition variable
(function) [edit]
blocks on a condition variable
(function) [edit]
blocks on a condition variable, with a timeout
(function) [edit]
destroys a condition variable
(function) [edit]

[편집] 쓰레드 지역 저장소

<threads.h> 헤더에 정의됨.
thread local type macro
(macro constant) [edit]
tss_t thread-specific storage pointer [edit]
maximum number of times destructors are called
(macro constant) [edit]
tss_dtor_t function pointer type used for TSS destructor [edit]
creates thread-specific storage pointer with a given destructor
(function) [edit]
reads from thread-specific storage
(function) [edit]
write to thread-specific storage
(function) [edit]
releases the resources held by a given thread-specific pointer
(function) [edit]

[편집] 예약 식별자

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 쓰레드 지원 라이브러리