名前空間
変種
操作

mtx_init

提供: 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 mtx_init( mtx_t* mutex, int type );
(C11以来)
type持つ新しいミューテックスオブジェクトを作成します。オブジェクトがmutexが新しく作成されたミューテックスのIDに設定されているが指す.
Original:
Creates a new mutex object with type. The object pointed to by mutex is set to an identifier of the newly created mutex.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typeは、次のいずれかの値を持つ必要があります
Original:
type must have one of the following values:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • mtx_plain - シンプルな、非再帰的ミューテックスが作成された.
    Original:
    mtx_plain - a simple, non-recursive mutex is created.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • mtx_timed - タイムアウトをサポートする非再帰的ミューテックスが作成されます.
    Original:
    mtx_timed - a non-recursive mutex, that supports timeout, is created.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • mtx_plain | mtx_recursive - 再帰的ミューテックスが作成されます.
    Original:
    mtx_plain | mtx_recursive - a recursive mutex is created.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • mtx_timed | mtx_recursive - タイムアウトをサポートして再帰的ミューテックスが作成されます.
    Original:
    mtx_timed | mtx_recursive - a recursive mutex, that supports timeout, is created.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[編集] パラメータ

mutex -
初期化するmutexへのポインタ
Original:
pointer to the mutex to initialize
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
type -
ミューテックスのタイプ
Original:
the type of the mutex
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_errorその他のとき.
Original:
thrd_success if successful, thrd_error otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.