 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
PrimeTime
Joined: 19 Aug 2004 Posts: 25
|
Posted: Thu Dec 02, 2004 11:54 pm Post subject: Some help with SetAlarm() |
|
|
Hi again,
I'm having trouble finding any documentation on the EE's SetAlarm.
I'm wondering if when an alarm is set, it will call it's callback function even if there is another thread currently running.
Could anyone give me an example of how SetAlarm is used, or at least describe the parameters. When I try to use this function, my program will throw an exception.
My goal is to use a callback function that will be triggered by the alarm to cycle through my created threads.
Thanks again,
Ryan |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Fri Dec 03, 2004 1:13 am Post subject: |
|
|
The callback function is executed in the same context as DMAC and INTC interrupt handlers. You have a very small stack and you cannot execute the non "i" versions of kernel syscalls.
The only types of things you should be doing in your callback are signalling a semaphore or rotating the thread queue, IOW, the "i" versions of thread operations. _________________ "He was warned..." |
|
| Back to top |
|
 |
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|