TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Stephen Leake <[log in to unmask]>
Mon, 16 May 2005 09:50:19 -0400
text/plain (31 lines)
Rick Duley <[log in to unmask]> writes:

> with Ada.Dynamic_Priorities; use Ada.Dynamic_Priorities;
> with System;                 use System;
> procedure Foo is
> begin  -- Foo
>    Set_Priority(Priority => Any_Priority'First);
>    . . .
> end Foo;
> does not work 

By "work" you mean it does not set the _process_ priority to what
Windows calls "Low".

However, what the Ada LRM says Priority means has to do with a
thread's priority _within_ a process, not the process priority itself.
So by that definition, it probably does "work".

> I must have something wrong in my coding for the use of Annex D because I
> believe that prioritisation was always supported by the Gnat Ada Compilers. 

GNAT supports thread (Ada task) priorities; it has no notion of
process priorities.

-- Stephe