Wiki Page Content

Differences between revisions 5 and 6
Revision 5 as of 2010-10-18 02:08:00
Size: 1450
Editor: SheenaSmith
Comment: update content - pointers, structs
Revision 6 as of 2013-08-09 05:10:46
Size: 53
Editor: Sam Lantinga
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma section-numbers off
#pragma disable-camelcase
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||

= SDL_mutexP =
Use this function to lock ,,the,, ^a^ mutex.

<<TableOfContents()>>

== Syntax ==
{{{#!highlight cpp
int SDL_mutexP(SDL_mutex* mutex)
}}}

== Function Parameters ==
||'''mutex'''||^the mutex to lock^||

== Return Value ==
Returns 0 on success or a negative error code on failure; call [[SDL_GetError]]() for more information.

== Code Examples ==
{{{#!highlight cpp
You can add your code example here
}}}

== Remarks ==
*<<BR>>[[SDL_mutexP]]() locks the mutex, which was previously created with [[SDL_CreateMutex]](). If the mutex is already locked by another thread then [[SDL_mutexP]]() will not return until the thread that locked it unlocks it (with [[SDL_mutexV]]()). If called repeatedly on a mutex, [[SDL_mutexV]]() must be called ^an^ equal ,,amount,, ^number^ of times to return the mutex to ^the/an^ unlocked state.

SDL also defines a macro `#define SDL_LockMutex(m) SDL_mutexP(m)`. <<BR>>*

''-or-''

[[SDL_mutexP]](m) and SDL_!LockMutex(m) are equivalent.

''-or-'' The macro SDL_!LockMutex(m) will call [[SDL_mutexP]](m).

<<Color2(green,I'm guessing this !LockMutex part will actually be omitted but I left it in since it was mentioned in the old wiki.)>>

== Related Functions ==
 .[[SDL_CreateMutex]] *
 .[[SDL_mutexV]] *

----
[[CategoryAPI]], [[CategoryMutex]]
SDL_mutexP has been replaced with [[SDL_LockMutex]]

SDL_mutexP has been replaced with SDL_LockMutex

None: SDL_mutexP (last edited 2015-02-21 10:30:59 by PhilippWiesemann)

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