Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      mtx_init

      From cppreference.com
      <c‎ |thread
       
       
      Concurrency support library
       
      Defined in header<threads.h>
      int mtx_init(mtx_t* mutex,int type);
      (since C11)

      Creates a new mutex object withtype. The object pointed to bymutex is set to an identifier of the newly created mutex.

      type must have one of the following values:

      Contents

      [edit]Parameters

      mutex - pointer to the mutex to initialize
      type - the type of the mutex

      [edit]Return value

      thrd_success if successful,thrd_error otherwise.

      [edit]References

      • C17 standard (ISO/IEC 9899:2018):
      • 7.26.4.2 The mtx_init function (p: 277-278)
      • C11 standard (ISO/IEC 9899:2011):
      • 7.26.4.2 The mtx_init function (p: 381)

      [edit]See also

      C++ documentation fortimed_mutex
      C++ documentation forrecursive_mutex
      C++ documentation forrecursive_timed_mutex
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=c/thread/mtx_init&oldid=138858"

      [8]ページ先頭

      ©2009-2025 Movatter.jp