Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2010-06-02 00:35:16
Size: 630
Editor: SheenaSmith
Comment: create page, add content (Wed Mar 10 ver; changeset 4428)
Revision 2 as of 2010-09-08 22:32:42
Size: 839
Editor: SheenaSmith
Comment: update content (old wiki)
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
||'''sem'''||^a pointer to the SDL_sem structure to be destroyed^|| ||'''sem'''||^a pointer to the SDL_sem structure / semaphore to be destroyed^||
Line 20: Line 20:
You can add your code example here if (my_sem != NULL) {
        SDL_DestroySemaphore(my_sem);
        my_sem = NULL;
}
Line 24: Line 27:
''You can add useful comments here'' *<<BR>>It is not safe to destroy a semaphore if there are threads currently ,,blocked,, waiting on it. <<BR>>*
Line 27: Line 30:
 .[[SDL_CreateSemaphore]] ???  .[[SDL_CreateSemaphore]] *

<<Color2(green,The old wiki lists the other Sem functions as RFs.)>>

DRAFT

SDL_DestroySemaphore

Use this function to destroy a semaphore.

Syntax

void SDL_DestroySemaphore(SDL_sem* sem)

Function Parameters

sem

a pointer to the SDL_sem structure / semaphore to be destroyed

Code Examples

if (my_sem != NULL) {
        SDL_DestroySemaphore(my_sem);
        my_sem = NULL;
}

Remarks

*
It is not safe to destroy a semaphore if there are threads currently blocked waiting on it.
*

green


CategoryAPI, CategoryMutex

None: SDL_DestroySemaphore (last edited 2013-08-12 05:44:22 by Sam Lantinga)

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