EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Problems with priorities in epicsThreadCreate (part of the EPICS OSI software layer)
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: Eric Norum <[email protected]>, Goetz Pfeiffer <[email protected]>
Date: Mon, 20 Feb 2012 15:46:29 -0600
Hi Goetz,

On 2012-02-20 Eric Norum wrote:
> How about calling the RTEMS rtems_task_set_priority routine from the
> beginning of your new thread?

I think I prefer Eric's suggestion to adding anything to the epicsThread API.

For each particular OS you will already need an OS-specific numeric priority, 
so you'll have to have OS-specific code in the source file anyway.  In that 
case you can just call the OS-specific API to change the new thread's 
priority.  For vxWorks and RTEMS that would mean adding something like this:

#if defined(vxWorks)
    taskPrioritySet(0, 66);
#elif defined(RTEMS)
    {
        rtems_task_priority old;
        rtems_task_set_priority(RTEMS_SELF, 66, &old);
    }
#endif

Now it's obvious that the this is OS-specific code, and the thread priority 
can be easily set to whatever is appropriate for the OS.

- Andrew
-- 
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham

Replies:
Re: Problems with priorities in epicsThreadCreate (part of the EPICS OSI software layer) Goetz Pfeiffer
References:
Problems with priorities in epicsThreadCreate (part of the EPICS OSI software layer) Goetz Pfeiffer
Re: Problems with priorities in epicsThreadCreate (part of the EPICS OSI software layer) Eric Norum

Navigate by Date:
Prev: Re: Problems with priorities in epicsThreadCreate (part of the EPICS OSI software layer) Eric Norum
Next: Connection to Siemens S7 PLC Konrad Gajewski
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Problems with priorities in epicsThreadCreate (part of the EPICS OSI software layer) Eric Norum
Next: Re: Problems with priorities in epicsThreadCreate (part of the EPICS OSI software layer) Goetz Pfeiffer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024