feature: add alignment functions for mutex, condition variable, and read-write lock
This commit is contained in:
parent
d5c7ea29f9
commit
75fbe33201
1 changed files with 33 additions and 0 deletions
|
|
@ -28,6 +28,17 @@ struct drang_mutex;
|
|||
*/
|
||||
DRANG_PLATFORM_API size_t drang_mutex_size(void);
|
||||
|
||||
/**
|
||||
* @brief Returns the alignment in bytes required for a mutex structure.
|
||||
*
|
||||
* This function returns the platform-specific alignment needed to allocate
|
||||
* a mutex structure. Useful for stack allocation or custom memory management.
|
||||
*
|
||||
* @return Alignment in bytes required for a drang_mutex structure.
|
||||
* @remarks The returned alignment is platform-specific and may vary between builds.
|
||||
*/
|
||||
DRANG_PLATFORM_API size_t drang_mutex_alignment(void);
|
||||
|
||||
/**
|
||||
* @brief Creates and initializes a new mutex on the heap.
|
||||
*
|
||||
|
|
@ -144,6 +155,17 @@ struct drang_cond;
|
|||
*/
|
||||
DRANG_PLATFORM_API size_t drang_cond_size(void);
|
||||
|
||||
/**
|
||||
* @brief Returns the alignment in bytes required for a condition variable structure.
|
||||
*
|
||||
* This function returns the platform-specific alignment needed to allocate
|
||||
* a condition variable structure. Useful for stack allocation or custom memory management.
|
||||
*
|
||||
* @return Alignment in bytes required for a drang_cond structure.
|
||||
* @remarks The returned alignment is platform-specific and may vary between builds.
|
||||
*/
|
||||
DRANG_PLATFORM_API size_t drang_cond_alignment(void);
|
||||
|
||||
/**
|
||||
* @brief Creates and initializes a new condition variable on the heap.
|
||||
*
|
||||
|
|
@ -300,6 +322,17 @@ struct drang_rwlock;
|
|||
*/
|
||||
DRANG_PLATFORM_API size_t drang_rwlock_size(void);
|
||||
|
||||
/**
|
||||
* @brief Returns the alignment in bytes required for a read-write lock structure.
|
||||
*
|
||||
* This function returns the platform-specific alignment needed to allocate
|
||||
* a read-write lock structure. Useful for stack allocation or custom memory management.
|
||||
*
|
||||
* @return Alignment in bytes required for a drang_rwlock structure.
|
||||
* @remarks The returned alignment is platform-specific and may vary between builds.
|
||||
*/
|
||||
DRANG_PLATFORM_API size_t drang_rwlock_alignment(void);
|
||||
|
||||
/**
|
||||
* @brief Creates and initializes a new read-write lock on the heap.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue