Changeset 6881e0c in rtems


Ignore:
Timestamp:
Apr 15, 1997, 6:02:18 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
83e39b26
Parents:
c24fef3
Message:

Reduced number of POSIX thread priorities from 255 to 254 to avoid conflicts
of lowest priority with the RTEMS IDLE thread. This was causing the lowest
priority GNAT Ada task to never run.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/headers/priority.h

    rc24fef3 r6881e0c  
    1616 *
    1717 *  Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
     18 *
     19 *  There are only 254 posix priority levels since a task at priority level
     20 *  255 would never run because of the RTEMS idle task.  This is necessary
     21 *  because GNAT maps the lowest Ada task priority to the lowest thread
     22 *  priority.  The lowest priority Ada task should get to run, so there is
     23 *  a fundamental conflict with having 255 priorities.
    1824 */
    1925
    20 #define POSIX_SCHEDULER_MAXIMUM_PRIORITY (255)
     26#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (254)
    2127 
    2228#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
  • c/src/exec/posix/include/rtems/posix/priority.h

    rc24fef3 r6881e0c  
    1616 *
    1717 *  Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
     18 *
     19 *  There are only 254 posix priority levels since a task at priority level
     20 *  255 would never run because of the RTEMS idle task.  This is necessary
     21 *  because GNAT maps the lowest Ada task priority to the lowest thread
     22 *  priority.  The lowest priority Ada task should get to run, so there is
     23 *  a fundamental conflict with having 255 priorities.
    1824 */
    1925
    20 #define POSIX_SCHEDULER_MAXIMUM_PRIORITY (255)
     26#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (254)
    2127 
    2228#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
  • c/src/exec/posix/inline/priority.inl

    rc24fef3 r6881e0c  
    1818)
    1919{
    20   return (boolean) (priority >= 1 && priority <= 255);
     20  return (boolean) (priority >= 1 && priority <= 254);
    2121}
    2222
     
    2525)
    2626{
    27   return (Priority_Control) (256 - priority);
     27  return (Priority_Control) (255 - priority);
    2828}
    2929
     
    3232)
    3333{
    34   return 256 - priority;
     34  return 255 - priority;
    3535}
    3636
  • c/src/exec/posix/inline/rtems/posix/priority.inl

    rc24fef3 r6881e0c  
    1818)
    1919{
    20   return (boolean) (priority >= 1 && priority <= 255);
     20  return (boolean) (priority >= 1 && priority <= 254);
    2121}
    2222
     
    2525)
    2626{
    27   return (Priority_Control) (256 - priority);
     27  return (Priority_Control) (255 - priority);
    2828}
    2929
     
    3232)
    3333{
    34   return 256 - priority;
     34  return 255 - priority;
    3535}
    3636
  • cpukit/posix/include/rtems/posix/priority.h

    rc24fef3 r6881e0c  
    1616 *
    1717 *  Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
     18 *
     19 *  There are only 254 posix priority levels since a task at priority level
     20 *  255 would never run because of the RTEMS idle task.  This is necessary
     21 *  because GNAT maps the lowest Ada task priority to the lowest thread
     22 *  priority.  The lowest priority Ada task should get to run, so there is
     23 *  a fundamental conflict with having 255 priorities.
    1824 */
    1925
    20 #define POSIX_SCHEDULER_MAXIMUM_PRIORITY (255)
     26#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (254)
    2127 
    2228#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
  • cpukit/posix/inline/rtems/posix/priority.inl

    rc24fef3 r6881e0c  
    1818)
    1919{
    20   return (boolean) (priority >= 1 && priority <= 255);
     20  return (boolean) (priority >= 1 && priority <= 254);
    2121}
    2222
     
    2525)
    2626{
    27   return (Priority_Control) (256 - priority);
     27  return (Priority_Control) (255 - priority);
    2828}
    2929
     
    3232)
    3333{
    34   return 256 - priority;
     34  return 255 - priority;
    3535}
    3636
Note: See TracChangeset for help on using the changeset viewer.