Wiki Page Content

Differences between revisions 2 and 5 (spanning 3 versions)
Revision 2 as of 2010-09-09 20:11:44
Size: 868
Editor: SheenaSmith
Comment: update content (old wiki)
Revision 5 as of 2013-08-12 06:16:13
Size: 605
Editor: Sam Lantinga
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
#pragma disable-camelcase
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
#pragma camelcase off
Line 6: Line 5:
Use this function to return the current count of ,,the,, ^a^ semaphore. Use this function to get the current value of a semaphore.
Line 16: Line 15:
||'''sem'''||^a pointer to the SDL_sem structure / semaphore to query^|| ||'''sem'''||the semaphore to query||
Line 19: Line 18:
Returns the current count of the semaphore or a negative error code on failure; call [[SDL_GetError]]() for more information. Returns the current value of the semaphore.
Line 22: Line 21:
*
Line 24: Line 22:
sem_value = SDL_SemValue(my_sem); You can add your code example here
Line 26: Line 24:
*
Line 32: Line 29:
 .[[SDL_SemPost]] *
 .[[SDL_SemTryWait]] *
 .[[SDL_SemWait]] *
 .[[SDL_SemWaitTimeout]] *
 .[[SDL_CreateSemaphore]]

SDL_SemValue

Use this function to get the current value of a semaphore.

Syntax

Uint32 SDL_SemValue(SDL_sem* sem)

Function Parameters

sem

the semaphore to query

Return Value

Returns the current value of the semaphore.

Code Examples

You can add your code example here

Remarks

You can add useful comments here


CategoryAPI, CategoryMutex

None: SDL_SemValue (last edited 2013-08-12 06:16:13 by Sam Lantinga)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit