- Using now os_usleep instead of usleep

This commit is contained in:
Maschell 2017-05-07 14:44:47 +02:00
parent 62ac147339
commit b7d5e68026
11 changed files with 13 additions and 13 deletions

View File

@ -69,7 +69,7 @@ Application::~Application(){
log_printf("Application::~Application(line %d): Triggering AsyncDeleter\n",__LINE__); log_printf("Application::~Application(line %d): Triggering AsyncDeleter\n",__LINE__);
AsyncDeleter::triggerDeleteProcess(); AsyncDeleter::triggerDeleteProcess();
while(!AsyncDeleter::realListEmpty()){ while(!AsyncDeleter::realListEmpty()){
usleep(1000); os_usleep(1000);
} }
}while(!AsyncDeleter::deleteListEmpty()); }while(!AsyncDeleter::deleteListEmpty());
AsyncDeleter::destroyInstance(); AsyncDeleter::destroyInstance();

@ -1 +1 @@
Subproject commit 5c7be021d07e7d482accabbe686e3ff5927dde6b Subproject commit 3559a18408126682d25ffe51ff6a43f99119e441

@ -1 +1 @@
Subproject commit 64f225382a6b832458e3bcf054418c23edce4f1b Subproject commit a2f4abdbebedce82e36d10635d25d22038169795

View File

@ -50,7 +50,7 @@ GuiImageAsync::~GuiImageAsync()
{ {
threadRemoveImage(this); threadRemoveImage(this);
while(pInUse == this) while(pInUse == this)
usleep(1000); os_usleep(1000);
if (imgData) if (imgData)
delete imgData; delete imgData;

View File

@ -126,7 +126,7 @@ void GuiSound::Stop()
v->setState(Voice::STATE_STOP); v->setState(Voice::STATE_STOP);
while(v->getState() != Voice::STATE_STOPPED) while(v->getState() != Voice::STATE_STOPPED)
usleep(1000); os_usleep(1000);
} }
SoundDecoder * decoder = SoundHandler::instance()->getDecoder(voice); SoundDecoder * decoder = SoundHandler::instance()->getDecoder(voice);

View File

@ -1,4 +1,4 @@
#include "Application.h" #include "Application.h"
#include "dynamic_libs/os_functions.h" #include "dynamic_libs/os_functions.h"
#include "dynamic_libs/gx2_functions.h" #include "dynamic_libs/gx2_functions.h"
#include "dynamic_libs/syshid_functions.h" #include "dynamic_libs/syshid_functions.h"
@ -192,7 +192,7 @@ bool SplashScreen(s32 time,const char * message,u8 pos,u32 button){
i = times; i = times;
} }
i++; i++;
usleep(sleepingtime); os_usleep(sleepingtime);
} }
return result; return result;
} }

View File

@ -68,7 +68,7 @@ Mp3Decoder::~Mp3Decoder()
{ {
ExitRequested = true; ExitRequested = true;
while(Decoding) while(Decoding)
usleep(100); os_usleep(100);
mad_synth_finish(&Synth); mad_synth_finish(&Synth);
mad_frame_finish(&Frame); mad_frame_finish(&Frame);

View File

@ -82,7 +82,7 @@ OggDecoder::~OggDecoder()
{ {
ExitRequested = true; ExitRequested = true;
while(Decoding) while(Decoding)
usleep(100); os_usleep(100);
if(file_fd) if(file_fd)
ov_clear(&ogg_file); ov_clear(&ogg_file);

View File

@ -46,7 +46,7 @@ SoundDecoder::~SoundDecoder()
{ {
ExitRequested = true; ExitRequested = true;
while(Decoding) while(Decoding)
usleep(1000); os_usleep(1000);
//! lock unlock once to make sure it's really not decoding //! lock unlock once to make sure it's really not decoding
Lock(); Lock();

View File

@ -50,7 +50,7 @@ SoundHandler::SoundHandler()
//! wait for initialization //! wait for initialization
while(!isThreadSuspended()) while(!isThreadSuspended())
usleep(1000); os_usleep(1000);
} }
SoundHandler::~SoundHandler() SoundHandler::~SoundHandler()
@ -96,7 +96,7 @@ void SoundHandler::RemoveDecoder(s32 voice)
voiceList[voice]->setState(Voice::STATE_STOP); voiceList[voice]->setState(Voice::STATE_STOP);
while(voiceList[voice]->getState() != Voice::STATE_STOPPED) while(voiceList[voice]->getState() != Voice::STATE_STOPPED)
usleep(1000); os_usleep(1000);
} }
SoundDecoder *decoder = DecoderList[voice]; SoundDecoder *decoder = DecoderList[voice];
decoder->Lock(); decoder->Lock();

View File

@ -48,7 +48,7 @@ void log_print(const char *str)
} }
while(log_lock) while(log_lock)
usleep(1000); os_usleep(1000);
log_lock = 1; log_lock = 1;
s32 len = strlen(str); s32 len = strlen(str);