comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter F. Gath" <Peter.Gath@ifr.uni-stuttgart.de>
Subject: Re: Gnat 3.13p on NT - protected objects
Date: Thu, 28 Jun 2001 10:00:41 +0200
Date: 2001-06-28T10:00:41+02:00	[thread overview]
Message-ID: <3B3AE429.5999642B@ifr.uni-stuttgart.de> (raw)
In-Reply-To: MPG.15a436b5a36845d19896bd@news.cis.dfn.de

Hi Alex.

We have also experienced this problem. Right now, we are using some basic
Windows NT functions to change the priority. Below is a small test
program you might want to try. It works fine for our application, and
a similar approach should be possible when you work with different
threads or tasks.

Good luck,

   Peter


8<-----------------

with Ada.Text_IO;   use Ada.Text_IO;
with win32;
with win32.winbase;

procedure Testprio is
   use type Win32.BOOL;
   check : Win32.BOOL;
begin
   put_line("Program has normal priority class now.");
   put_line("In 20 seconds, priority class will be changed...");
   delay(20.0);
   check := Win32.Winbase.SetPriorityClass(
                  win32.Winbase.GetCurrentProcess,
                  Win32.Winbase.IDLE_PRIORITY_CLASS);
   put_line("Program is running as idle process now.");
   put_line("Program is terminated in 20 seconds...");
   delay(20.0);
end Testprio;

8<-----------------

"Alejandro R. Mosteo" wrote:
> 
> Hello all.
> 
> I'm using Gnat for a student project. I've recently learned that Gnat on
> NT doesn't change priority of threads when entering a protected call. In
> other words, the ceiling priority is not set and the thread runs at a
> lower priority that it should run.
> 
> I've looked the assembler code generated and it seems true. I'm quite
> perplexed, since I've never read nothing related in the docs, and never
> before anybody has told nothing about that.
> 
> Can someone enlighten me a bit? Exists some easy work around for this
> "feature"?
> 
> Many thanks,
> 
> Álex.
> 
> -------------------------------------------
> Alejandro R. Mosteo
> mailto: 402450@cepsz.unizar.uu_remove_uu.es
> -------------------------------------------

-- 
____________________________________________________________

Peter F. Gath    University of Stuttgart
Dipl.-Ing.       Institute of Flight Mechanics and Control
                 Pfaffenwaldring 7a
                 D-70550 Stuttgart
                 Germany
                 Tel.: +49 711 - 6 85 - 66 67
                 Fax : +49 711 - 6 85 - 66 70

Email: peter.gath@ifr.uni-stuttgart.de
http://www.ifr.uni-stuttgart.de/
____________________________________________________________



  reply	other threads:[~2001-06-28  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-27 17:30 Gnat 3.13p on NT - protected objects Alejandro R. Mosteo
2001-06-28  8:00 ` Peter F. Gath [this message]
2001-06-30 18:13   ` Alejandro R. Mosteo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox