comp.lang.ada
 help / color / mirror / Atom feed
* sigsuspend or pause system calls in Ada
@ 2003-02-11  0:58 alfonso acosta
  2003-02-11  8:08 ` Samuel Tardieu
  2003-02-11 14:37 ` Rodrigo Garcia
  0 siblings, 2 replies; 5+ messages in thread
From: alfonso acosta @ 2003-02-11  0:58 UTC (permalink / raw)


hi:

I need to use those system calls, are they aviable in Ada? In case they 
arent, can I interface with libc?

Thanks in advance:

Alfonso Acosta




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sigsuspend or pause system calls in Ada
  2003-02-11  0:58 sigsuspend or pause system calls in Ada alfonso acosta
@ 2003-02-11  8:08 ` Samuel Tardieu
  2003-02-11 14:37 ` Rodrigo Garcia
  1 sibling, 0 replies; 5+ messages in thread
From: Samuel Tardieu @ 2003-02-11  8:08 UTC (permalink / raw)


>>>>> "Alfonso" == alfonso acosta <alfonso_acosta_mail@yahoo.es> writes:

Alfonso> hi: I need to use those system calls, are they aviable in
Alfonso> Ada? In case they arent, can I interface with libc?

procedure Pause;
pragma Import (C, Pause);

(the return value is useless, as it is always -1)

  Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/sam



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sigsuspend or pause system calls in Ada
  2003-02-11  0:58 sigsuspend or pause system calls in Ada alfonso acosta
  2003-02-11  8:08 ` Samuel Tardieu
@ 2003-02-11 14:37 ` Rodrigo Garcia
  2003-02-11 14:53   ` alfonso acosta
  1 sibling, 1 reply; 5+ messages in thread
From: Rodrigo Garcia @ 2003-02-11 14:37 UTC (permalink / raw)


"alfonso acosta" <alfonso_acosta_mail@yahoo.es> wrote in message
news:3e484b2c$1_2@news.arrakis.es...
> hi:
>
> I need to use those system calls, are they aviable in Ada? In case they
> arent, can I interface with libc?
>
> Thanks in advance:
>
> Alfonso Acosta

Do you really *need* to use them?
If you just want to pause your system, try a simple "delay" statement.

Rodrigo





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sigsuspend or pause system calls in Ada
  2003-02-11 14:37 ` Rodrigo Garcia
@ 2003-02-11 14:53   ` alfonso acosta
  2003-02-11 19:56     ` Rodrigo Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: alfonso acosta @ 2003-02-11 14:53 UTC (permalink / raw)



> Do you really *need* to use them?
Well, I need my rocedure to be waiting for a signal, maybe it works if I 
just do

while True loop;
   delay 1;
end loop;

signals will be handled when delay is executed?

> If you just want to pause your system, try a simple "delay" statement.
> 
> Rodrigo
> 
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sigsuspend or pause system calls in Ada
  2003-02-11 14:53   ` alfonso acosta
@ 2003-02-11 19:56     ` Rodrigo Garcia
  0 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Garcia @ 2003-02-11 19:56 UTC (permalink / raw)


"alfonso acosta" <alfonso_acosta_mail@yahoo.es> wrote in message
news:3e490ec7_4@news.arrakis.es...
>
> > Do you really *need* to use them?
> Well, I need my rocedure to be waiting for a signal, maybe it works if I
> just do
>
> while True loop;
>    delay 1;
> end loop;
>
> signals will be handled when delay is executed?

    Hmm, then I think it is better to suspend the thread by calling an entry
on a protected object. The protected object will have a procedure attached
to the signal you are waiting for. This procedure will open the barrier when
it receives the signal. Got it? Do you prefer it in Spanish?  ;^)

    BTW, how are you handling the signals you receive?

Rodrigo






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-11 19:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11  0:58 sigsuspend or pause system calls in Ada alfonso acosta
2003-02-11  8:08 ` Samuel Tardieu
2003-02-11 14:37 ` Rodrigo Garcia
2003-02-11 14:53   ` alfonso acosta
2003-02-11 19:56     ` Rodrigo Garcia

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