View unanswered posts | View active topics It is currently Mon Feb 27, 2017 9:51 am



Reply to topic  [ 5 posts ] 
 sleep and usleep in libogc 1.8.15 not working 
Author Message

Joined: Mon Jul 04, 2011 1:03 pm
Posts: 32
The sleep and usleep functions does not work in libogc 1.8.15.
"sleep" freezes the Wii with any value. "usleep" freezes the Wii with big values or when it is called several times.
Since all my projects use the sleep functions, none of them works with the new lib.

Could this be the cause of MAME and network sockettest example not working?

Could it be caused by some problems with the thread managment?


Tue Jan 03, 2017 5:14 pm
Profile
Site Admin

Joined: Tue Aug 09, 2005 3:21 am
Posts: 1188
Location: UK
It's definitely a distinct possibility. Thanks for pointing this out.

If you could try compiling a fresh copy of libogc with optimisations turned down that might help narrow things down a bit too.

_________________
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog


Wed Jan 04, 2017 4:04 am
Profile ICQ WWW

Joined: Mon Jul 04, 2011 1:03 pm
Posts: 32
You were right. It is an optimization issue.

I tried with no optimization flag, -O2 and -O3. All of them give a working sleep function.
I also tried other thread tests (i.e. mutex) which did not work; they work with the optimizations above.
I also compiled with -Os (the flag used in your distribution pack) and the sleep function does work.

This are the sizes of libocg.a lib files:
0s: 2,896 KB
02: 3,125 KB
03: 4,436 KB

I am using the O2 version. ll seems to work now.


Wed Jan 04, 2017 1:08 pm
Profile

Joined: Mon Jul 04, 2011 1:03 pm
Posts: 32
I wanted to say that with -Os flag, sleep function does not work


Wed Jan 04, 2017 10:07 pm
Profile
Site Admin

Joined: Tue Aug 09, 2005 3:21 am
Posts: 1188
Location: UK
Thanks for doing this. I've recompiled the libogc release with -O2 and uploaded a new archive. Shall have to see if I can track down what's happening with -Os later.

_________________
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog


Thu Jan 05, 2017 3:34 pm
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads