docs: Add \threadsafety to some low-hanging fruit across a few headers.

Reference Issue #7140.
This commit is contained in:
Ryan C. Gordon
2024-10-22 13:47:28 -04:00
parent eed11ad6d6
commit 2318961b6f
4 changed files with 70 additions and 0 deletions

View File

@@ -56,6 +56,8 @@ extern "C" {
* \returns an unsigned 64-bit value representing the number of milliseconds
* since the SDL library initialized.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicks(void);
@@ -66,6 +68,8 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicks(void);
* \returns an unsigned 64-bit value representing the number of nanoseconds
* since the SDL library initialized.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicksNS(void);
@@ -81,6 +85,8 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicksNS(void);
*
* \returns the current counter value.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetPerformanceFrequency
@@ -92,6 +98,8 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
*
* \returns a platform-specific count per second.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetPerformanceCounter
@@ -107,6 +115,8 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);
*
* \param ms the number of milliseconds to delay.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
@@ -120,6 +130,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
*
* \param ns the number of nanoseconds to delay.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC void SDLCALL SDL_DelayNS(Uint64 ns);
@@ -133,6 +145,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_DelayNS(Uint64 ns);
*
* \param ns the number of nanoseconds to delay.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.1.4.
*/
extern SDL_DECLSPEC void SDLCALL SDL_DelayPrecise(Uint64 ns);
@@ -275,6 +289,8 @@ extern SDL_DECLSPEC SDL_TimerID SDLCALL SDL_AddTimerNS(Uint64 interval, SDL_NSTi
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AddTimer