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_rwlock_t Struct Reference

A pthread read-write lock. More...

#include <stk_c_pthread.h>

Collaboration diagram for pthread_rwlock_t:

Public Attributes

stk_rwmutex_mem_t __mem
 In-place storage for the STK rwmutex object.
void * __handle
 Object constructed in __mem, or NULL if not yet constructed.
volatile bool __wrlocked
 True while held for writing; selects Unlock() vs ReadUnlock() on release.

Detailed Description

A pthread read-write lock.

Note
Fields are considered private. May be statically initialized with PTHREAD_RWLOCK_INITIALIZER, in which case the underlying STK rwmutex is created lazily on first use.
See also
"pthread_rwlock_unlock() disambiguation" in the file-level docs regarding the __wrlocked field.

Definition at line 369 of file stk_c_pthread.h.

Member Data Documentation

◆ __handle

void* pthread_rwlock_t::__handle

Object constructed in __mem, or NULL if not yet constructed.

Definition at line 372 of file stk_c_pthread.h.

Referenced by stk::pthread::EnsureRWLock(), stk::pthread::HandleOf(), pthread_rwlock_destroy(), pthread_rwlock_init(), and pthread_rwlock_unlock().

◆ __mem

stk_rwmutex_mem_t pthread_rwlock_t::__mem

In-place storage for the STK rwmutex object.

Definition at line 371 of file stk_c_pthread.h.

Referenced by stk::pthread::EnsureRWLock(), and pthread_rwlock_init().

◆ __wrlocked

volatile bool pthread_rwlock_t::__wrlocked

True while held for writing; selects Unlock() vs ReadUnlock() on release.

Definition at line 373 of file stk_c_pthread.h.

Referenced by pthread_rwlock_init(), pthread_rwlock_timedwrlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), and pthread_rwlock_wrlock().


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