From 7512bdd33b1a3086a7f6312373b15915a846f46d Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 3 Sep 1991 12:00:30 +0000 Subject: [PATCH] updated to minix 1.5 --- lib/minix/include/.distr | 1 + lib/minix/include/sys/.distr | 3 +++ lib/minix/include/sys/dir.h | 17 +++++++++++++++ lib/minix/include/sys/times.h | 26 +++++++++++++++++++++++ lib/minix/include/sys/wait.h | 40 +++++++++++++++++++++++++++++++++++ lib/minixST/include/.distr | 1 + 6 files changed, 88 insertions(+) create mode 100644 lib/minix/include/sys/.distr create mode 100644 lib/minix/include/sys/dir.h create mode 100644 lib/minix/include/sys/times.h create mode 100644 lib/minix/include/sys/wait.h diff --git a/lib/minix/include/.distr b/lib/minix/include/.distr index 7df923b70..29670b592 100644 --- a/lib/minix/include/.distr +++ b/lib/minix/include/.distr @@ -9,3 +9,4 @@ signal.h string.h time.h utime.h +sys diff --git a/lib/minix/include/sys/.distr b/lib/minix/include/sys/.distr new file mode 100644 index 000000000..2c136ecf3 --- /dev/null +++ b/lib/minix/include/sys/.distr @@ -0,0 +1,3 @@ +dir.h +times.h +wait.h diff --git a/lib/minix/include/sys/dir.h b/lib/minix/include/sys/dir.h new file mode 100644 index 000000000..91bb04ac2 --- /dev/null +++ b/lib/minix/include/sys/dir.h @@ -0,0 +1,17 @@ +/* The header gives the layout of a directory. */ + +#ifndef _DIR_H +#define _DIR_H + +#define DIRBLKSIZ 512 /* size of directory block */ + +#ifndef DIRSIZ +#define DIRSIZ 14 +#endif + +struct direct { + ino_t d_ino; + char d_name[DIRSIZ]; +}; + +#endif /* _DIR_H */ diff --git a/lib/minix/include/sys/times.h b/lib/minix/include/sys/times.h new file mode 100644 index 000000000..d27dc4c65 --- /dev/null +++ b/lib/minix/include/sys/times.h @@ -0,0 +1,26 @@ +/* The header is for time times() system call. */ + +#ifndef _TIMES_H +#define _TIMES_H + +#ifndef _CLOCK_T +#define _CLOCK_T +typedef long clock_t; /* time in ticks since process started */ +#endif + +struct tms { + clock_t tms_utime; + clock_t tms_stime; + clock_t tms_cutime; + clock_t tms_cstime; +}; + + +/* Function Prototypes. */ +#ifndef _ANSI_H +#include +#endif + +_PROTOTYPE( clock_t times, (struct tms *_buffer) ); + +#endif /* _TIMES_H */ diff --git a/lib/minix/include/sys/wait.h b/lib/minix/include/sys/wait.h new file mode 100644 index 000000000..d22796176 --- /dev/null +++ b/lib/minix/include/sys/wait.h @@ -0,0 +1,40 @@ +/* The header contains macros related to wait(). The value + * returned by wait() and waitpid() depends on whether the process + * terminated by an exit() call, was killed by a signal, or was stopped + * due to job control, as follows: + * + * High byte Low byte + * +---------------------+ + * exit(status) | status | 0 | + * +---------------------+ + * killed by signal | 0 | signal | + * +---------------------+ + * stopped (job control) | signal | 0177 | + * +---------------------+ + */ + +#ifndef _WAIT_H +#define _WAIT_H + +#define _LOW(v) ( (v) & 0377) +#define _HIGH(v) ( ((v) >> 8) & 0377) + +#define WNOHANG 1 /* do not wait for child to exit */ +#define WUNTRACED 2 /* for job control; not implemented */ + +#define WIFEXITED(s) (_LOW(s) == 0) /* normal exit */ +#define WEXITSTATUS(s) (_HIGH(s)) /* exit status */ +#define WTERMSIG(s) (_LOW(s) & 0177) /* sig value */ +#define WIFSIGNALED(s) (((unsigned int)(s)-1 & 0xFFFF) < 0xFF) /* signaled */ +#define WIFSTOPPED(s) (_LOW(s) == 0177) /* stopped */ +#define WSTOPSIG(s) (_HIGH(s) & 0377) /* stop signal */ + +/* Function Prototypes. */ +#ifndef _ANSI_H +#include +#endif + +_PROTOTYPE( pid_t wait, (int *_stat_loc) ); +_PROTOTYPE( pid_t waitpid, (pid_t _pid, int *_stat_loc, int _options) ); + +#endif /* _WAIT_H */ diff --git a/lib/minixST/include/.distr b/lib/minixST/include/.distr index 7df923b70..29670b592 100644 --- a/lib/minixST/include/.distr +++ b/lib/minixST/include/.distr @@ -9,3 +9,4 @@ signal.h string.h time.h utime.h +sys