Specifications
Writing a User-Level Device Drive
r
17-13
overview of these system calls is provided in “Process Synchronization Tools” on page
17-19.
Overview of Error Returns 17
User-level device driver routines return a successful completion code, or they return an
error code directly instead of using errno.
A set of standard error codes that can be used by user-level device drivers is defined in the
file <userdriv.h>. An error message that corresponds to each error code is also
defined. User-level device drivers written by Concurrent Computer Corporation personnel
must use these error codes. Other user-level drivers are not required to use them. The error
codes and corresponding error messages are presented in Table 16-1.
Table 16-1. User-Level Device Driver Error Codes and Messages
Symbolic Name Message
EUD_NOERROR no error
EUD_PERM permission denied
EUD_SHMID shared memory identifier not found
EUD_SHMAT shared memory attach failed
EUD_INTR interrupted
EUD_IO i/o error (hardware failure)
EUD_SHMCTL shared memory control function failed
EUD_INIT device not initialized
EUD_SHMBIND shared memory bind failed
EUD_BADD bad device pointer
EUD_DEVMODE invalid device mode
EUD_BUFFER invalid user buffer
EUD_NOMEM dynamic memory allocation failed
EUD_ACCES no access
EUD_FAULT user-level device driver fault
EUD_TRANSMODE invalid data transfer mode
EUD_BUSY device busy
EUD_CREAT shared memory create failed
EUD_DRIVER user-level driver specific error
EUD_NODEV no device found
EUD_SPLMAP SPL error
EUD_IVECT unable to allocate interrupt vectors