* Task reschedule
@ 2002-08-05 12:46 Gruntfuggly
2002-08-05 15:24 ` David C. Hoos, Sr.
2002-08-05 16:03 ` Stephen Leake
0 siblings, 2 replies; 5+ messages in thread
From: Gruntfuggly @ 2002-08-05 12:46 UTC (permalink / raw)
I've always believed that 'delay 0.0' should cause a task reschedule.
However, it appears that my compiler simply optimizes the statement out.
Is there another way I can force the reschedule? I don't want to have to
put it a '0.02', but if I put in a line of Text_IO instead, that gives
me the correct functionality...
Nige
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Task reschedule
2002-08-05 12:46 Task reschedule Gruntfuggly
@ 2002-08-05 15:24 ` David C. Hoos, Sr.
2002-08-05 16:54 ` tmoran
2002-08-05 16:03 ` Stephen Leake
1 sibling, 1 reply; 5+ messages in thread
From: David C. Hoos, Sr. @ 2002-08-05 15:24 UTC (permalink / raw)
How about delay Duration'Small; ?
----- Original Message -----
From: "Gruntfuggly" <nigel.scott@uk.thalesgroup.com>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: August 05, 2002 7:46 AM
Subject: Task reschedule
> I've always believed that 'delay 0.0' should cause a task reschedule.
> However, it appears that my compiler simply optimizes the statement out.
>
> Is there another way I can force the reschedule? I don't want to have to
> put it a '0.02', but if I put in a line of Text_IO instead, that gives
> me the correct functionality...
>
> Nige
>
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Task reschedule
2002-08-05 15:24 ` David C. Hoos, Sr.
@ 2002-08-05 16:54 ` tmoran
0 siblings, 0 replies; 5+ messages in thread
From: tmoran @ 2002-08-05 16:54 UTC (permalink / raw)
> > I've always believed that 'delay 0.0' should cause a task reschedule.
> > However, it appears that my compiler simply optimizes the statement out.
> How about delay Duration'Small; ?
"The implementation shall document the minimum value of the delay
expression of a delay_relative_statement that causes the task to actually
be blocked." ALRM (optional) D.9(7) Of course blockage means till the
next clock tick, which may be an amazing long time with some systems.
D.9(14) "The execution time of a delay_statement that does not cause the
task to be blocked (e.g. 'delay 0.0;') is of interest in situations where
delays are used to achieve voluntary round-robin dispatching among
equal-priority tasks." That certainly ought to cause embarrassment,
at the least, to the vendor of a compiler that ignores a "delay 0.0;".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Task reschedule
2002-08-05 12:46 Task reschedule Gruntfuggly
2002-08-05 15:24 ` David C. Hoos, Sr.
@ 2002-08-05 16:03 ` Stephen Leake
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Leake @ 2002-08-05 16:03 UTC (permalink / raw)
Gruntfuggly <nigel.scott@uk.thalesgroup.com> writes:
> I've always believed that 'delay 0.0' should cause a task reschedule.
> However, it appears that my compiler simply optimizes the statement
> out.
>
> Is there another way I can force the reschedule? I don't want to have
> to put it a '0.02', but if I put in a line of Text_IO instead, that
> gives me the correct functionality...
If you give each task a distinct priority, the highest priority one
will run when it is ready.
Or you can enable time-slicing, if you don't actually care where the
task switch happens.
If you are using a round-robin scheme, you'll have to use an OS call
to put the current task to sleep.
It seems odd to not use time-slicing for this. If you actually care
where the task switch happens, you should use a rendezvous or
protected object to force the task synchronization.
--
-- Stephe
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <ur8hcdl53.fsf@gsfc.nasa.gov>]
end of thread, other threads:[~2002-08-14 3:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-05 12:46 Task reschedule Gruntfuggly
2002-08-05 15:24 ` David C. Hoos, Sr.
2002-08-05 16:54 ` tmoran
2002-08-05 16:03 ` Stephen Leake
[not found] <ur8hcdl53.fsf@gsfc.nasa.gov>
[not found] ` <YlT39.326$_R5.28416290@newssvr13.news.prodigy.com>
[not found] ` <aiqipm$jre$1@rdel.co.uk>
2002-08-14 3:19 ` Randy Brukardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox