The GNU Modula-2 front end to GCC

ulm-lib-gm2/sys/SYSTEM

DEFINITION MODULE FOR "C" SYSTEM ;

(*
    Description: provides a SYSTEM module for GNU Modula-2 so that the
                 ULM libraries can be built.
*)

EXPORT QUALIFIED (* the following are built into the compiler: *)
                 (* SIZE is exported if -fpim2 is enabled *)
                 CSIZE_T, CSSIZE_T, ADDRESS, WORD, BYTE,
		 ADR, TSIZE, THROW,
                 (* the rest are implemented in SYSTEM.c *)
                 UNIXCALL, UNIXSIGNAL, UNIXFORK ;


(*
   UNIXCALL - returns TRUE if the syscall was successful, results from
              the system call are returned in r0 and r1.
*)


PROCEDURE UNIXCALL (syscall: CARDINAL; VAR r0, r1: INTEGER; ...) : BOOLEAN;


(*
   UNIXFORK - returns TRUE if successful and pid is set to the son pid
              if the parent is returning. If the child is returning pid=0.
              UNIXFORK returns FALSE if an error occurs and errno is held in pid.
*)


PROCEDURE UNIXFORK (VAR pid: CARDINAL) : BOOLEAN ;


(*
   UNIXSIGNAL -
*)


PROCEDURE UNIXSIGNAL (signo: CARDINAL; p: PROC;
                      VAR old: PROC; VAR result: CARDINAL) : BOOLEAN;


END SYSTEM.