TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender: "Team Ada: Ada Programming Language Advocacy (83 & 95)" <[log in to unmask]>
X-To: Rick Duley <[log in to unmask]>
Date: Tue, 3 May 2005 16:31:16 +0100
Reply-To: Martin Dowie <[log in to unmask]>
From: Martin Dowie <[log in to unmask]>
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
MIME-Version: 1.0
Parts/Attachments: text/plain (50 lines)
You should use the standard library Ada.Dynamic_Priorities. See RM 
section D.5 and use routine Set_Priority.

Cheers

-- Martin

Rick Duley wrote:

>Hi Teamers
>
>I am attempting to set a low priority for a batch-file application so that
>interactive programs can work overhead in WEindows XP.
>
>I have:
>
>with Win32.WinBase; use Win32.Winbase;
>procedure Foo is
>
>   Priority_Set : Win32.Bool :=
>      SetPriorityClass(GetCurrentProcess, 1);
>
>begin  -- Foo
>   . . .
>end Foo;
>
>This builds and runs but has no effect on the priority of the thread as revealed
>ny Windows Task Manager.  Would someone please tell me where I have gone wrong?
>
>Thanks
>-------------------------------------------
>"Professional qualitative judgement
>   consists in knowing the rules
>     for using (or occasionally breaking)
>       the rules."
>                            D. Royce Sadler
>-------------------------------------------
>Rick Duley
>Murdoch University
>School of Engineering Science
>Perth, Western Australia
>http://eng.murdoch.edu.au/~rick
>aussie : 040 910 6049                .-_|\
>o'seas : + 61 40 910 6049           /     \
>                              perth *_.-._/
>                                         v
>
>  
>

ATOM RSS1 RSS2