DCE for the HP e3000 (B3821-90002)

Programming with Kernel Threads
Input Reference Parameter Protection for Intrinsics
Chapter 5
66
Input Reference Parameter Protection for Intrinsics
When an intrinsic accepts a reference parameter, the data within that parameter could
be changed by another thread if the data does not lie on the calling thread's stack. If it
appeared that a corrupt input reference parameter could either cause the system to
abort or corrupt system data structures, protection was added to that intrinsic.
The following list contains intrinsics that make input reference parameter protection
difficult. Programmers need to provide their own scheme for protecting the input
reference parameter data during the execution of these intrinsics.
FDEVICECONTROL The LENGTH parameter given to the intrinsic must exactly describe the length of the
BUFFER parameter. If LENGTH is either longer or shorter than the actual length of the
BUFFER parameter, unexpected results could occur.
FCONTROL There is no input reference parameter protection provided for the PARAM parameter.
AIF Intrinsics There is no input reference parameter protection provided for any of the AIF parameters.
POSIX Intrinsics The following POSIX intrinsics were found to have input reference parameters that
could be corrupted when used in a threaded environment.
POSIX Intrinsic Input Reference Parameter Name
chmod path
closedir dirp
mkdir path
opendir dirname
opendir_r dirname
readdir dirp
readdir_r dirp
rewinddir dirp
rmdir path
unlink path
creat path
open path
getenv name
ioctl arg (and all areas pointed to by arg)