Skip to content

Commit

Permalink
Sync SDL3 header -> wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed Oct 22, 2024
1 parent d57ed7b commit 7f71371
Show file tree
Hide file tree
Showing 35 changed files with 144 additions and 4 deletions.
4 changes: 4 additions & 0 deletions SDL3/SDL_ClearError.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ bool SDL_ClearError(void);
(bool) Returns true.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_Delay.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ This function waits a specified number of milliseconds before returning. It
waits at least the specified time, but possibly longer due to OS
scheduling.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_DelayNS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ This function waits a specified number of nanoseconds before returning. It
waits at least the specified time, but possibly longer due to OS
scheduling.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_DelayPrecise.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ This function waits a specified number of nanoseconds before returning. It
will attempt to wait as close to the requested time as possible, busy
waiting if necessary, but could return later due to OS scheduling.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.1.4.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetCPUCacheLineSize.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ int SDL_GetCPUCacheLineSize(void);
This is useful for determining multi-threaded structure padding or SIMD
prefetch sizes.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetError.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ The returned value is a thread-local string which will remain valid until
the current thread's error string is changed. The caller should make a copy
if the value is needed after the next SDL API call.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetNumLogicalCPUCores.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ int SDL_GetNumLogicalCPUCores(void);
technologies such as hyperthreading, the number of logical cores may be
more than the number of physical cores.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetPerformanceCounter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ The counter values are only meaningful relative to each other. Differences
between values can be converted to times by using
[SDL_GetPerformanceFrequency](SDL_GetPerformanceFrequency)().
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetPerformanceFrequency.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Uint64 SDL_GetPerformanceFrequency(void);
(Uint64) Returns a platform-specific count per second.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetSIMDAlignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ instruction sets SDL knows about, so if your SDL build doesn't have
support it sees and not 64 for the AVX-512 instructions that exist but SDL
doesn't know about. Plan accordingly.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetSystemRAM.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ int SDL_GetSystemRAM(void);
(int) Returns the amount of RAM configured in the system in MiB.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetTicks.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Uint64 SDL_GetTicks(void);
(Uint64) Returns an unsigned 64-bit value representing the number of
milliseconds since the SDL library initialized.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_GetTicksNS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Uint64 SDL_GetTicksNS(void);
(Uint64) Returns an unsigned 64-bit value representing the number of
nanoseconds since the SDL library initialized.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasARMSIMD.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ This is different from ARM NEON, which is a different instruction set.
This always returns false on CPUs that aren't using ARM instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasAVX.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasAVX(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasAVX2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasAVX2(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasAVX512F.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasAVX512F(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasAltiVec.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ bool SDL_HasAltiVec(void);
This always returns false on CPUs that aren't using PowerPC instruction
sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasLASX.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ bool SDL_HasLASX(void);
This always returns false on CPUs that aren't using LOONGARCH instruction
sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasLSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ bool SDL_HasLSX(void);
This always returns false on CPUs that aren't using LOONGARCH instruction
sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasMMX.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasMMX(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasNEON.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasNEON(void);
This always returns false on CPUs that aren't using ARM instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasSSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasSSE(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasSSE2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasSSE2(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasSSE3.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasSSE3(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasSSE41.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasSSE41(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_HasSSE42.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_HasSSE42(void);
This always returns false on CPUs that aren't using Intel instruction sets.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_OutOfMemory.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bool SDL_OutOfMemory(void);
This function does not do any memory allocation.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_RemoveTimer.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ bool SDL_RemoveTimer(SDL_TimerID id);
(bool) Returns true on success or false on failure; call
[SDL_GetError](SDL_GetError)() for more information.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_SetError.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ if (error_code) {
}
```

## Thread Safety

It is safe to call this function from any thread.

## Version

This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_SetErrorV.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ bool SDL_SetErrorV(const char *fmt, va_list ap);
Calling this function will replace any previous error message that was set.
## Thread Safety
It is safe to call this function from any thread.
## Version
This function is available since SDL 3.1.4.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_bsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ data key = { 2, NULL };
data *result = SDL_bsearch(&key, values, SDL_arraysize(values), sizeof(values[0]), compare);
```

## Thread Safety

It is safe to call this function from any thread.

## Version

This function is available since SDL 3.0.0.
Expand Down
8 changes: 6 additions & 2 deletions SDL3/SDL_bsearch_r.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ int SDLCALL compare(const void *userdata, const void *a, const void *b)
const data *A = (const data *)a;
const data *B = (const data *)b;
if (A->n < B->n) {
if (A->key < B->key) {
return (method == sort_increasing) ? -1 : 1;
} else if (B->n < A->n) {
} else if (B->key < A->key) {
return (method == sort_increasing) ? 1 : -1;
} else {
return 0;
Expand All @@ -67,6 +67,10 @@ data key = { 2, NULL };
data *result = SDL_bsearch_r(&key, values, SDL_arraysize(values), sizeof(values[0]), compare, (const void *)(uintptr_t)sort_increasing);
```

## Thread Safety

It is safe to call this function from any thread.

## Version

This function is available since SDL 3.0.0.
Expand Down
4 changes: 4 additions & 0 deletions SDL3/SDL_qsort.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ data values[] = {
SDL_qsort(values, SDL_arraysize(values), sizeof(values[0]), compare);
```

## Thread Safety

It is safe to call this function from any thread.

## Version

This function is available since SDL 3.0.0.
Expand Down
Loading

0 comments on commit 7f71371

Please sign in to comment.