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?
sleep and usleep in libogc 1.8.15 not working
-
- Site Admin
- Posts: 1911
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: sleep and usleep in libogc 1.8.15 not working
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.
If you could try compiling a fresh copy of libogc with optimisations turned down that might help narrow things down a bit too.
Re: sleep and usleep in libogc 1.8.15 not working
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.
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.
Re: sleep and usleep in libogc 1.8.15 not working
I wanted to say that with -Os flag, sleep function does not work
-
- Site Admin
- Posts: 1911
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: sleep and usleep in libogc 1.8.15 not working
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.
Who is online
Users browsing this forum: No registered users and 1 guest