z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Considerations for writing a PFS in C

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

A PFS can be written in System Programmer's C. The BPXYPFSI and BPXYVFSI headers define the structures and parameters that are needed for PFSs that are written in C. A PFS that is written in C can avoid the cost of establishing a C environment each time it is invoked for a vnode or VFS function, by requesting that the LFS invoke the PFS with pre-initialized C environments. The PFS requests this at initialization by setting the pfsi_cpfs flag in the PFSI.

The PFS must not do anything that would sever addressability to the stack.

Because the PFS is running in a cross-memory environment, Language Environment® and C/C++ run-time library functions are not available. A PFS that needs to invoke these functions must attach a worker task, or tasks, to accomplish these functions.

See Using daemon tasks within a PFS for information about services that make creating these worker tasks easier.

Some assembler services that may be useful are provided in Assembler and C-language facilities for writing a PFS in C. In particular, BPXFASM must be assembled and link-edited with the PFS modules, to provide the correct @@XGET/@@XFREE routines for their C environment.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014