SysMutexDestroy

Table of Contents

SysMutexDestroy

Description

Destroy the provided mutex object. Once a mutex is destroyed, all resources held by it will be freed. Using it after this cal is UB.

Parameters

NameDirectionDescription
minMutex object to be destroyed.

Success

Resources released.

Failure

Function cannot fail - safe to call with NULL.

Usage example (Cross-references)

    
    if (log_mutex) {
    SysMutexDestroy(log_mutex);
    }
    }
    
    void free_log_mutex(void) {
    SysMutexDestroy(log_mutex);
    }
    }
    
    void SysMutexDestroy(SysMutex *m) {
    #ifdef _WIN32
    DeleteCriticalSection(&m->lock);

Share :

Related Posts

IterInitRevAlignedT

IterInitRevAlignedT Description Initialize Iter with custom alignment to iterate in backward direction.

Read More

IterRemainingLength

IterRemainingLength Description Get remaining length left to read this memory iterator.

Read More

Iter

Iter Description Memory iterators are there to allow reading regions of memory by remembering current read position and the size limit. With proper checking we can guarantee that we can never overflow or underflow when reading a memory region This also means that Iter objects are created for use with only one reading operation, and one object in their lifetime. The designed API does not allow modifications to the data Iter is iterating over FIELDS: - data : Pointer to memory we’re iterating over - length : Number of objects in memory. - pos : Current iterating position. - size : Alignment requirements (if-any), must be at-least 1 - dir : Iteration direction, -1 or 1

Read More