forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some help with SetAlarm()

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
PrimeTime



Joined: 19 Aug 2004
Posts: 25

PostPosted: Thu Dec 02, 2004 11:54 pm    Post subject: Some help with SetAlarm() Reply with quote

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
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Fri Dec 03, 2004 1:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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