Message Board
Message Board > Fenix / Bennu / Gemix / DIV > Process priority (fenix) |
August 3, 2008, 14:41 | |
OScoder
None 1338 posts |
Hi there, Just a quick question: is there a way to change the priority of a process, so that it is always the first one executed? Thanks, OScoder ____________ om |
# |
August 3, 2008, 15:29 | |
Htbaa
Perl 368 posts |
In DIV2 you could do this inside a process. priority = 10 So if you have process t1() and t2() where t2() has it's priority set to 4 and t1() has it's priority set to 7 then t2() will be executed first. ____________ blog.htbaa.com |
# |
August 3, 2008, 16:12 | |
Rincewind
programmer 1558 posts ![]() |
What Htbaa said is also correct for Fenix and Bennu. Priority is a local variable with default value zero.
____________ Personal website: http://www.loijson.com |
# |
August 4, 2008, 13:29 | |
Dennis
どこかにいる 2099 posts ![]() |
if the priority is zero how will the compiler choose? (pick the first one it finds in his stack or something?)
____________ Kwakkel |
# |
August 4, 2008, 15:03 | |
Sandman
F3n!x0r 1196 posts ![]() |
Actually t1() will be executed first, because it has a higher priority ( 7 > 4 ) than t2(). If priorities are equal, it's not defined. It's just the one that's next in the list. ____________ BennuWiki Yes, my avatar has grey borders in IE (so get a decent browser) ROOFLEZ ROOFLEZ |
# |
August 4, 2008, 18:12 | |
Htbaa
Perl 368 posts |
Oh well, I didn't check how it sorts the list. But thanks for making it clear :-)
____________ blog.htbaa.com |
# |
Message Board > Fenix / Bennu / Gemix / DIV > Process priority (fenix)