名前空間
変種
操作

thread_create

提供: cppreference.com
< c‎ | thread

 
 
スレッドのサポートライブラリ
スレッド
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.
 
Defined in header <threads.h>
int thrd_create( thrd_t *thr, thrd_start_t func, void *arg );
(C11以来)
関数funcを実行する新しいスレッドを作成します。関数がfunc(arg)として呼び出された.
Original:
Creates a new thread executing the function func. The function is invoked as func(arg).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
成功した場合、オブジェクトはthrが指す、新しいスレッドの識別子に設定されています.
Original:
If successful, the object pointed to by thr is set to the identifier of the new thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
この関数の終了は、スレッドの開始と同期.
Original:
The completion of this function synchronizes with the beginning of the thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] パラメータ

thr -
新しいスレッドの識別子を置くメモリ位置へのポインタ
Original:
pointer to memory location to put the identifier of the new thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
func -
実行する関数
Original:
function to execute
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
arg -
関数に渡す引数
Original:
argument to pass to the function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

thrd_success新規スレッドの作成が成功したかどうか。別のエラーが発生した場合、メモリやthrd_nomemの不十分な量があった場合、それ以外の場合thrd_error返し.
Original:
thrd_success if the creation of the new thread was successful. Otherwise returns thrd_nomem if there was insufficient amount of memory or thrd_error if another error occurred.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] ノート

スレッドが終了し、joinかdetachされた後は、新しいスレッドを識別するスレッドのため再利用されるかもしれません.
Original:
The thread identifies may be reused for new threads once the thread has finished and joined or detached.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] も参照してください

スレッドをデタッチします
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]
ブロックは、スレッドが終了するまで
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]