名前空間
変種
操作

call_once

提供: 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.
call_once
条件変数
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>
void call_once( once_flag* flag, void (*func)(void) );
(C11およびそれ以降)
コー​​ルは、複数のスレッドから呼び出された場合であっても、一度だけfunc機能.
Original:
Calls function func exactly once, even if invoked from several threads.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
関数funcの完成は同じcall_once変数でflagへの以前またはそれ以降の呼び出しと同期.
Original:
The completion of the function func synchronizes with all previous or subsequent calls to call_once with the same flag variable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] パラメータ

flag -
funcを確保するために使用されているオブジェクトへのポインタは一度だけ呼び出されます
Original:
pointer to an object that is used to ensure func is called only once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
func -
実行する関数
Original:
the 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.

[編集] 値を返します

(なし)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.