HPlogo Interprocess Communication: Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 4 Special Cases of IPC

Extended Wait

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

If a process calls an intrinsic to perform an I/O and it encounters an EOF condition, it will either return a CCG condition code or wait in the intrinsic until the EOF condition is resolved. (See "EOF Conditions" in Chapter 3.) In some applications, it is useful that the process always wait instead of receiving a CCG. It may be known that another process will eventually open the file and satisfy the blocked I/O request.

MPE/iX lets the process request this extended wait mode through FCONTROL with a controlcode of 45. Extended wait always starts out disabled, but both readers and writers can enable or disable it.

If extended wait is explicitly enabled, the process always waits on an EOF condition. If extended wait is explicitly disabled, the process will not wait on an EOF condition unless there is an "opposite accessor" to the file. In the default condition (extended wait is not explicitly enabled or disabled), the process will wait if there is an opposite accessor, or if this is the first I/O to the file.

Another feature of extended wait also concerns opposite accessors. If a process is waiting for action by an opposite accessor, and the last opposite accessor closes the file, this will cause an EOF and "wake up" the waiting process.

Refer to the discussion of "EOF Conditions" in Chapter 3 for more information about this feature. Also, see Example B-2 in Appendix B.

Feedback to webmaster