[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

help with event flags, ASTs, X, and IP?

» close window

The Question is:

 
I am porting a Sun Solaris program that makes heavy use
of TCP/IP sockets to OpenVMS. This program also connects
to multiple X Window servers. I also do I/O to other
devices. The "other devices" are handled with QIO calls
that specify an event flag number to be set when the I/O
completes, I do a wait for event flag call to suspend
execution until an I/O operation completes. I also have
a few timers that can set the event flag to wake up the
process. The question is, how do I do the asynchronous
reads to the multiple X Window servers and the TCP/IP
sockets and still use my existing event flags with out
blocking? It seems that I need to do away with the Unix
select() call, but then I need to do QIO's to all of the
I/O devices, the X Window servers, the TCP/IP sockets, so
how do I mix and match the Unix sockets with OpenVMS QIO's.
 
Thanks.
 
 


The Answer is :

 
  The Wizard long ago moved away from the chains of synchronous I/O.
  The mechanisms you will want to evaluate are the AST and the thread.
  ASTs are supported directly by most OpenVMS system services, including
  sys$qio calls, and allow you to select a routine to execute when some
  specified event occurs.
 
  And specifically with X Windows, you can use the XtAppAddInput() call.
  (Be aware that the event flag specified via XtAppAddInput() must be
  in event flag cluster zero.)
 
  As for other operations, with the proper use of lib$get_ef to allocate
  free event flags, you can mix AST calls with code performing both
  synchronous and asynchronous operations.
 

answer written or last revised on ( 9-JUL-1998 )

» close window