DCE for the HP e3000 (B3821-90002)

Programming with Kernel Threads
File Access From Threads
Chapter 5
68
File Access From Threads
The following is a high-level overview of the file system functionality available:
The file system supports thread sharable NM disk files, including user mapped files
and spoolfiles. CM files (tapes, cir, rio, CM KSAM) are thread private
(Thread-Non-Sharable). Thread-Semi-Sharable terminals and printers are
supported. Thread-Semi-Sharable means that some, but not all, intrinsics can be
called from all threads for these file types.
PRINT and READX can be used by any thread if $STDIN or $STDLIST is an
AVESTA or Virtual Terminal. They are only supported for the initial thread, if the
terminal is a TMUX Terminal. READ is supported for the initial thread only for all
terminal types.
Only the initial thread can open Thread-Non-Sharable or Thread-Semi-Sharable files
as system files. Only the initial thread can re-open system files if the system files are
printers or terminals. However, HPFDUPLICATE allows each thread to get their
own file descriptor for a system file.
FCHECK (filenum) returns the last error that the calling thread incurred on the file
if that error is also the last file system error for the calling thread.
FLOCK behaves as an advisory lock outside task boundaries; if one thread in a task
has a file FLOCKed, all other threads block if they call a file system intrinsic on the
file.
•ForIOWAIT, only the thread that opened the file for NOWAIT IO can call IOWAIT
for that file, and only the thread that opened the file with NOWAIT can call any IO
intrinsics on the file.