Changeset 6e8632f in ada-examples for task_priority


Ignore:
Timestamp:
Jul 23, 2008, 4:05:13 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
ada-examples-4-10-branch, ada-examples-4-9-branch, master
Children:
8325959
Parents:
bc4db0b
Message:

2008-07-23 Joel Sherrill <joel.sherrill@…>

  • empty.c, task_priority.adb: Switch to 150/151. Clean up output.
Location:
task_priority
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • task_priority/ChangeLog

    rbc4db0b r6e8632f  
     12008-07-23      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * empty.c, task_priority.adb: Switch to 150/151. Clean up output.
     4
    152008-02-06      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • task_priority/empty.c

    rbc4db0b r6e8632f  
    66{
    77#if defined(__rtems__)
    8   printk( "ID=0x%08x\n", _Thread_Executing->Object.id );
     8  printk( "ID=0x%08x ", _Thread_Executing->Object.id );
    99
    1010  return (int)_Thread_Executing->current_priority;
  • task_priority/task_priority.adb

    rbc4db0b r6e8632f  
    33--
    44--
    5 --High:  17
    6 --HighNative: ID=0x0B010004
    7 -- 238
    8 --Low:  16
    9 --LowNative: ID=0x0B010003
    10 -- 239
     5-- Expected Output:
     6--    High:  151
     7--    HighNative: ID=0x0B010004  104
     8--    Low:  150
     9--    LowNative: ID=0x0B010003  105
     10--    High - Waking up
     11--    High - Waking up
     12--     ....
     13--
     14--  $Id$
    1115
    1216
     
    2226     pragma Import (C, getPriority, "getPriority");
    2327   begin
    24      Put_Line (Interfaces.C.int'Image (getPriority));
     28     Put (Interfaces.C.int'Image (getPriority));
    2529   end Put_Priority;
    2630
    27    -- I think 16 > 17 to Ada
     31   -- I think 151 > 150 to Ada
    2832   task Low_Task is
    29      pragma Priority(16);
     33     pragma Priority(150);
    3034   end Low_Task;
    3135
    3236   task High_Task is
    33      pragma Priority(17);
     37     pragma Priority(151);
    3438   end High_Task;
    3539
     
    3943     Put ( "HighNative: " );
    4044     Put_Priority;
     45     New_Line;
    4146     loop
    4247       delay 1.0;
     
    5257     Put ( "LowNative: " );
    5358     Put_Priority;
     59     New_Line;
    5460     delay 0.1;
    5561     loop
Note: See TracChangeset for help on using the changeset viewer.