[comp.sys.amiga] ChangePri

sam@utcsri.UUCP (07/30/87)

In article <5163@utcsri.UUCP> flaps@utcsri.UUCP (Alan J Rosenthal) writes:
>
>I've found references to this call in both RKMs, but no parameter specs.
>How do I call it?  And is the priority change to an absolute number or
>relative? 

Is what you want SetTaskPri?  Its description reads "...changes the priority
of a task regardless of its state. ..."

It is documented on page A-162 of the RKM, Libraries and Devices.  Perhaps
they decided to change the name of the command at the last moment?
-- 
                              -Sam Weber

UUCP: {ihnp4 utzoo decwrl uw-beaver}!utcsri!sam
ARPA: sam@csri.toronto.edu
CSNET: sam@toronto

"If the rich could have others to die for them, the poor could make a nice
living."

ali@rocky.STANFORD.EDU (Ali Ozer) (07/31/87)

In article <5163@utcsri.UUCP> flaps@utcsri.UUCP (Alan J Rosenthal) writes:
>I've found references to this call in both RKMs, but no parameter specs.
>How do I call it?  And is the priority change to an absolute number or
>relative?  Or was it deleted from 1.2?  If so, how do I change my priority?
>I want to start a task at a slightly high priority and then have it change
>its priority back to zero once it's finished initializing.

You can use SetTaskPri() to do what you want to do ---

    oldpriority = SetTaskPri (task, newpriority);

    
Thus you simply do:

    struct Task *me;
    if (me = FindTask(NULL)) oldpri = SetTaskPri(me, newpri);
  
and later you can set the priority back to oldpri. The priority you
supply is an absolute value. 

Ali Ozer, ali@rocky.stanford.edu