SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
pthread_once_t Struct Reference

A pthread_once() control object. More...

#include <stk_c_pthread.h>

Collaboration diagram for pthread_once_t:

Public Attributes

int __state
 0 = not started, 1 = running, 2 = done.
stk_mutex_mem_t __mem
 In-place storage for the guard mutex.
void * __handle
 Guard mutex constructed in __mem, or NULL if not yet constructed.

Detailed Description

A pthread_once() control object.

Note
Fields are considered private. Statically initialized with PTHREAD_ONCE_INIT; the guard mutex used to block concurrent callers is created lazily on first use. See "pthread_once() note" in the file-level docs.

Definition at line 426 of file stk_c_pthread.h.

Member Data Documentation

◆ __handle

void* pthread_once_t::__handle

Guard mutex constructed in __mem, or NULL if not yet constructed.

Definition at line 430 of file stk_c_pthread.h.

Referenced by stk::pthread::EnsureOnceMutex(), and stk::pthread::HandleOf().

◆ __mem

stk_mutex_mem_t pthread_once_t::__mem

In-place storage for the guard mutex.

Definition at line 429 of file stk_c_pthread.h.

Referenced by stk::pthread::EnsureOnceMutex().

◆ __state

int pthread_once_t::__state

0 = not started, 1 = running, 2 = done.

Definition at line 428 of file stk_c_pthread.h.

Referenced by pthread_once().


The documentation for this struct was generated from the following file: