MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / skr_init_rw_mutex

Function skr_init_rw_mutex

modules/core/base/src/SkrOS/apple/thread.c:80–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78/// implementation of rw mutex
79
80bool skr_init_rw_mutex(SRWMutex* pMutex)
81{
82 pMutex->mSpinCount = MUTEX_DEFAULT_SPIN_COUNT;
83 int err = pthread_rwlock_init(&pMutex->pHandle, NULL);
84 SKR_ASSERT(err == 0 && "RWMutex::Init: failed to initialize the rw lock");
85 return err == 0;
86}
87
88void skr_destroy_rw_mutex(SRWMutex* pMutex)
89{

Callers 6

log_worker.cppFile · 0.50
JobQueueMethod · 0.50
ThreadSafeContainerMethod · 0.50
DStorageEventPoolMethod · 0.50
io_batch.hppFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected