comp.lang.ada
 help / color / mirror / Atom feed
From: jb@rti.UUCP (Jeff Bartlett)
Subject: Re: Help me to solve this problem!
Date: Thu, 27-Aug-87 14:39:46 EDT	[thread overview]
Date: Thu Aug 27 14:39:46 1987
Message-ID: <1680@rti.UUCP> (raw)
In-Reply-To: 8708241839.AA01159@ucbvax.Berkeley.EDU

In article <8708241839.AA01159@ucbvax.Berkeley.EDU>, ie53@NTSUVAX.BITNET (HAERIM LEE) writes:

 > procedure imore is      -- Intelligent 'more'
 > 

 > This program is similar to 'more' on Unix except its more
 > clever default behavior; that is, it keeps printing each
  .....
 > "next screen" is printed, and it was sitting idle until I hit
 > the <space bar>.  I noticed that this is because the 'get'
 > statement in the main body does not return its control to
 > the task 'mon_user' when it is suspended (Is it?) by this input
 > operation, while the task 'mon_user' was already in a suspended
 > state and possibly in a ready state if the specified delay time
 > had passed.  In this case, the control should be given 'mon_user'
 > so that the procedure call 'print_next' after the delay state-
 > ment can be executed.  Actually, I found that the task 'mon_user'
 > did NOT become suspended when the 'get' was invoked, but remained
 > as a 'running' state.  This can be shown using the VAX/VMS Symbolic
 > Debugger.

 > Shouldn't the state of the task 'mon_user' become
 > 'suspended' when the 'get' is called, if there are any 'ready'
 > tasks?  If not, how do we easily implement such time-bombs for
 > input operations?  What is the relationship between task states
 > and i/o operations?  In Ada, are i/o operations done synchronously
 > or asynchronously?  Seems to be 'synchronous' in the Vax Ada V1.3.
 >
 > --    Haerim Lee (IE53@NTSUVAX)

See section 2.7 "Input-Output and Tasking" in "VAX Ada Programmer's Run-Time
Reference Manual", p 2-73.

I/O on SYS$INPUT, SYS$OUTPUT, SYS$COMMAND, and SYS$ERROR are 'synchronous'.
TEXT_IO used ADA$INPUT and ADA$OUTPUT which is normally assigned to SYS$INPUT
and SYS$OUTPUT.  To get 'async' i/o, assign ADA$INPUT and ADA$OUTPUT to TT: in
DCL.

Jeff Bartlett
Center for Digital Systems Research
Research Triangle Institute
jb@rti.rti.org

      parent reply	other threads:[~1987-08-27 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-08-24 19:06 Help me to solve this problem! HAERIM LEE
1987-08-25 21:15 ` Arny B. Engelson
1987-08-27 18:39 ` Jeff Bartlett [this message]
replies disabled

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