Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
SysTypes


NAME

SysTypes - standard types for system calls

SYNOPSIS

TYPE File = INTEGER;
TYPE Address = Types.Address;
TYPE UntracedAddress = Types.UntracedAddress;
TYPE Count = Types.Count;
TYPE Offset = LONGINT;
TYPE Device = INTEGER;
TYPE Inode = LONGINT;
TYPE Time = LONGINT;
TYPE Size = Types.Size;
TYPE Word = INTEGER;
TYPE Byte = Types.Byte;


(* possible values of the idtype parameter (4 bytes), see <sys/procset.h> *) CONST idPid = 0; (* a process identifier *) CONST idPpid = 1; (* a parent process identifier *) CONST idPgid = 2; (* a process group (job control group) identifier *) CONST idSid = 3; (* a session identifier *) CONST idCid = 4; (* a scheduling class identifier *) CONST idUid = 5; (* a user identifier *) CONST idGid = 6; (* a group identifier *) CONST idAll = 7; (* all processes *) CONST idLwpid = 8; (* an LWP identifier *) TYPE IdType = INTEGER; (* idPid .. idLwpid *)

DESCRIPTION

SysTypes exports some types frequently used for system calls. They correspond to types of /usr/include/sys/types.h:
Oberon type   C-type    description
___________________________________________________________
File          int       file descriptor
Address       caddr_t   core address type
Offset        off_t     file positions and offsets
Count         off_t     synonym for Offset
Device        dev_t     major and minor number
Inode         ino_t     inode number
Time          time_t    number of seconds since Jan 1, 1970
Size          size_t    number of bytes

The type Word is defined to be equivalent to int of the C language. C traditionally defines the int data type to have the same width as the CPU bus (i.e. a machine word).

SEE ALSO

Types
compiler dependent type definitions

BUGS

The reason for Count is historical: unrevised Oberon does not support parameter names in procedure types. So different type identifiers were used to distinguish parameters.
Edited by: borchert, last change: 2004/06/03, revision: 1.4, converted to HTML: 2004/06/03

Oberon || Library || Module Index || Search Engine || Definition || Module