diff --git a/Source/DrangPlatform/Include/drang/sync.h b/Source/DrangPlatform/Include/drang/sync.h index aa0460e..5401c94 100644 --- a/Source/DrangPlatform/Include/drang/sync.h +++ b/Source/DrangPlatform/Include/drang/sync.h @@ -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. *