Pumpkin, Inc.

Pumpkin User Forums

OS_Yield()

Have an idea on how to make Salvo better? Post it here!

OS_Yield()

Postby luben » Tue Feb 06, 2001 2:31 am

Hello,

Just an idea - if you return the control to the scheduler will be good if the task can point which task to ran immediately after that. This is something like to change the priority of one task from other task, and after the task becomes running to return its priority to the normal value.

Sometimes is good to ensure that after returning the control to the scheduler the program will run specific task. You have to agree that the priorities are not something fixed - so this will just add some new functionality to SALVO. Maybe the command should not be called OS_Yield() but something OS_CallTask() or something like that, because it's not only returniong the control to Scheduler, but it will force the kernel to run specific task.

Just an idea

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: OS_Yield()

Postby aek » Wed Feb 07, 2001 9:55 am

Modifying OSSched() to do what you envision is not a good idea ... but with v2.2, you can do it like this:

1) Leave the highest priority unused.

2) In the "current task", use OSSetPrioTask() to change the priority of the task you want to run immediately after the current task. Or, use OSStartTask() if that task is stopped (and always has the highest priority).

3) Return to the scheduler via OS_Yield().

4) The newly-elevated-priority or newly-started-highest-priority task will then run, and can then reduce its own priority (via OS_Prio()) or it can stop itself via OSStop().

From a performance and portability standpoint, it's better to keep the scheduler and the context-switcher as simple as possible, and use the various services to accomplish your goal.

[This message has been edited by aek (edited February 07, 2001).]

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OS_Yield()

Postby tbims23822 » Wed Jul 08, 2009 12:10 am

www.drop-shopping.com is a premium website for cheap air jordans shoes and other more really nike air jordan shoes.We have varity of cheap air jordan shoes available for wholesale.Cheap China wholesale shoes including cheap Nike shoes and cheap jordan shoes,nike sneakers,nike sneakers discount,air jordan sneakers,air force sneakers.We supply nike sneakers,jordan sneakers,air jordan sneakers,air force sneakers wholesale.You can buy very cheap jordans shoes including cheap women shoes,cheap nike shoes,cheap running shoes from us.
tbims23822
 


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron