mirror of
https://github.com/encounter/SDL.git
synced 2025-12-13 23:26:18 +00:00
N-Gage port: add changes from code reviews, overall cleanup (#5618)
* Add changes from code review by @ccawley2011, #5597, overall cleanup * Update N-Gage README, minor cleanup and rephrasing * Call SDL_SetMainReady() before calling SDL_main, return SDL_main instead of main
This commit is contained in:
committed by
GitHub
parent
2c2cbbe664
commit
9b75fa0165
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/* An implementation of mutexes using semaphores */
|
||||
/* An implementation of mutexes using the Symbian API. */
|
||||
|
||||
#include <e32std.h>
|
||||
|
||||
@@ -70,6 +70,22 @@ SDL_DestroyMutex(SDL_mutex * mutex)
|
||||
}
|
||||
}
|
||||
|
||||
/* Try to lock the mutex */
|
||||
#if 0
|
||||
int
|
||||
SDL_TryLockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
if (mutex == NULL)
|
||||
{
|
||||
SDL_SetError("Passed a NULL mutex.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Not yet implemented.
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Lock the mutex */
|
||||
int
|
||||
SDL_LockMutex(SDL_mutex * mutex)
|
||||
@@ -89,7 +105,7 @@ SDL_LockMutex(SDL_mutex * mutex)
|
||||
|
||||
/* Unlock the mutex */
|
||||
int
|
||||
SDL_mutexV(SDL_mutex * mutex)
|
||||
SDL_UnlockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
if ( mutex == NULL )
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/* An implementation of semaphores using mutexes and condition variables */
|
||||
/* An implementation of semaphores using the Symbian API. */
|
||||
|
||||
#include <e32std.h>
|
||||
|
||||
|
||||
@@ -128,19 +128,6 @@ SDL_SYS_DetachThread(SDL_Thread * thread)
|
||||
return;
|
||||
}
|
||||
|
||||
/* WARNING: This function is really a last resort.
|
||||
* Threads should be signaled and then exit by themselves.
|
||||
* TerminateThread() doesn't perform stack and DLL cleanup.
|
||||
*/
|
||||
void
|
||||
SDL_SYS_KillThread(SDL_Thread *thread)
|
||||
{
|
||||
RThread rthread;
|
||||
rthread.SetHandle(thread->handle);
|
||||
rthread.Kill(0);
|
||||
rthread.Close();
|
||||
}
|
||||
|
||||
#endif /* SDL_THREAD_NGAGE */
|
||||
|
||||
/* vim: ts=4 sw=4
|
||||
|
||||
Reference in New Issue
Block a user