about summary refs log tree commit diff
path: root/REORG.TODO/sysdeps/generic/sys
diff options
context:
space:
mode:
Diffstat (limited to 'REORG.TODO/sysdeps/generic/sys')
-rw-r--r--REORG.TODO/sysdeps/generic/sys/ptrace.h137
-rw-r--r--REORG.TODO/sysdeps/generic/sys/reboot.h9
-rw-r--r--REORG.TODO/sysdeps/generic/sys/socketvar.h3
-rw-r--r--REORG.TODO/sysdeps/generic/sys/swap.h32
-rw-r--r--REORG.TODO/sysdeps/generic/sys/syscall.h2
-rw-r--r--REORG.TODO/sysdeps/generic/sys/sysinfo.h40
-rw-r--r--REORG.TODO/sysdeps/generic/sys/ttydefaults.h100
-rw-r--r--REORG.TODO/sysdeps/generic/sys/ucontext.h44
8 files changed, 367 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/generic/sys/ptrace.h b/REORG.TODO/sysdeps/generic/sys/ptrace.h
new file mode 100644
index 0000000000..2b5ce4d74d
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/ptrace.h
@@ -0,0 +1,137 @@
+/* `ptrace' debugger support interface.  Generic version; constants are common.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef	_PTRACE_H
+
+#define	_PTRACE_H	1
+#include <features.h>
+
+__BEGIN_DECLS
+
+
+/* Type of the REQUEST argument to `ptrace.'  */
+enum __ptrace_request
+{
+  /* Indicate that the process making this request should be traced.
+     All signals received by this process can be intercepted by its
+     parent, and its parent can use the other `ptrace' requests.  */
+  PTRACE_TRACEME = 0,
+#define PT_TRACE_ME PTRACE_TRACEME
+
+  /* Return the word in the process's text space at address ADDR.  */
+  PTRACE_PEEKTEXT,
+#define PT_READ_I PTRACE_PEEKTEXT
+
+  /* Return the word in the process's data space at address ADDR.  */
+  PTRACE_PEEKDATA,
+#define PT_READ_D PTRACE_PEEKDATA
+
+  /* Return the word in the process's user area at offset ADDR.  */
+  PTRACE_PEEKUSER,
+#define PT_READ_U PTRACE_PEEKUSER
+
+  /* Write the word DATA into the process's text space at address ADDR.  */
+  PTRACE_POKETEXT,
+#define PT_WRITE_I PTRACE_POKETEXT
+
+  /* Write the word DATA into the process's data space at address ADDR.  */
+  PTRACE_POKEDATA,
+#define PT_WRITE_D PTRACE_POKEDATA
+
+  /* Write the word DATA into the process's user space at offset ADDR.  */
+  PTRACE_POKEUSER,
+#define PT_WRITE_U PTRACE_POKEUSER
+
+  /* Continue the process.  */
+  PTRACE_CONT,
+#define PT_CONTINUE PTRACE_CONT
+
+  /* Kill the process.  */
+  PTRACE_KILL,
+#define PT_KILL PTRACE_KILL
+
+  /* Single step the process.
+     This is not supported on all machines.  */
+  PTRACE_SINGLESTEP,
+#define PT_STEP PTRACE_SINGLESTEP
+
+  /* Attach to a process that is already running. */
+  PTRACE_ATTACH,
+#define PT_ATTACH PTRACE_ATTACH
+
+  /* Detach from a process attached to with PTRACE_ATTACH.  */
+  PTRACE_DETACH,
+#define PT_DETACH PTRACE_DETACH
+
+  /* Get the process's registers (not including floating-point registers)
+     and put them in the `struct regs' (see <machine/regs.h>) at ADDR.  */
+  PTRACE_GETREGS = 12,
+
+  /* Set the process's registers (not including floating-point registers)
+     to the contents of the `struct regs' (see <machine/regs.h>) at ADDR.  */
+  PTRACE_SETREGS,
+
+  /* Get the process's floating point registers and put them
+     in the `struct fp_status' (see <machine/regs.h>) at ADDR.  */
+  PTRACE_GETFPREGS = 14,
+
+  /* Set the process's floating point registers to the contents
+     of the `struct fp_status' (see <machine/regs.h>) at ADDR.  */
+  PTRACE_SETFPREGS,
+
+  /* Read DATA bytes from the process's data space at address ADDR.
+     Put the result starting at address ADDR2 in the caller's
+     address space.  */
+  PTRACE_READDATA = 16,
+
+  /* Write DATA bytes from ADDR2 in the caller's address space into
+     the process's data space at address ADDR.  */
+  PTRACE_WRITEDATA,
+
+  /* Read DATA bytes from the process's text space at address ADDR.
+     Put the result starting at address ADDR2 in the caller's
+     address space.  */
+  PTRACE_READTEXT = 18,
+
+  /* Write DATA bytes from ADDR2 in the caller's address space into
+     the process's text space at address ADDR.  */
+  PTRACE_WRITETEXT,
+
+  /* Read the floating-point accelerator unit registers and
+     put them into the `struct fpa_regs' (see <machine/regs.h>) at ADDR.  */
+  PTRACE_GETFPAREGS = 20,
+
+  /* Write the floating-point accelerator unit registers from
+     the contents of the `struct fpa_regs' at ADDR.  */
+  PTRACE_SETFPAREGS
+};
+
+/* Perform process tracing functions.  REQUEST is one of the values
+   above, and determines the action to be taken.
+   For all requests except PTRACE_TRACEME, PID specifies the process to be
+   traced.
+
+   PID and the other arguments described above for the various requests should
+   appear (those that are used for the particular request) as:
+     pid_t PID, void *ADDR, int DATA, void *ADDR2
+   after REQUEST.  */
+extern int ptrace (enum __ptrace_request __request, ...);
+
+__END_DECLS
+
+#endif /* ptrace.h */
diff --git a/REORG.TODO/sysdeps/generic/sys/reboot.h b/REORG.TODO/sysdeps/generic/sys/reboot.h
new file mode 100644
index 0000000000..bada28dd6c
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/reboot.h
@@ -0,0 +1,9 @@
+/* This file should define RB_* macros to be used as flag
+   bits in the argument to the `reboot' system call.  */
+
+#ifndef _SYS_REBOOT_H
+#define _SYS_REBOOT_H
+
+#define RB_AUTOBOOT	0
+
+#endif	/* <sys/reboot.h> */
diff --git a/REORG.TODO/sysdeps/generic/sys/socketvar.h b/REORG.TODO/sysdeps/generic/sys/socketvar.h
new file mode 100644
index 0000000000..b177158d0b
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/socketvar.h
@@ -0,0 +1,3 @@
+/* This header is used on many systems but for GNU we have everything
+   already defined in the standard header.  */
+#include <sys/socket.h>
diff --git a/REORG.TODO/sysdeps/generic/sys/swap.h b/REORG.TODO/sysdeps/generic/sys/swap.h
new file mode 100644
index 0000000000..f86df4a607
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/swap.h
@@ -0,0 +1,32 @@
+/* Calls to enable and disable swapping on specified locations.  Unix version.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef __SYS_SWAP_H
+
+#define __SYS_SWAP_H	1
+#include <features.h>
+
+
+/* Make the block special device PATH available to the system for swapping.
+   This call is restricted to the super-user.  */
+extern int swapon (const char *__path, int __flags) __THROW;
+
+/* Stop using block special device PATH for swapping.  */
+extern int swapoff (const char *__path) __THROW;
+
+#endif /* sys/swap.h */
diff --git a/REORG.TODO/sysdeps/generic/sys/syscall.h b/REORG.TODO/sysdeps/generic/sys/syscall.h
new file mode 100644
index 0000000000..719bd08904
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/syscall.h
@@ -0,0 +1,2 @@
+/* For Unix-like systems, this file should contain definitions
+   of macros SYS_call for each system call, giving the call numbers.  */
diff --git a/REORG.TODO/sysdeps/generic/sys/sysinfo.h b/REORG.TODO/sysdeps/generic/sys/sysinfo.h
new file mode 100644
index 0000000000..279493de7e
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/sysinfo.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 1996-2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_SYSINFO_H
+#define _SYS_SYSINFO_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* Return number of configured processors.  */
+extern int get_nprocs_conf (void) __THROW;
+
+/* Return number of available processors.  */
+extern int get_nprocs (void) __THROW;
+
+
+/* Return number of physical pages of memory in the system.  */
+extern long int get_phys_pages (void) __THROW;
+
+/* Return number of available physical pages of memory in the system.  */
+extern long int get_avphys_pages (void) __THROW;
+
+__END_DECLS
+
+#endif	/* sys/sysinfo.h */
diff --git a/REORG.TODO/sysdeps/generic/sys/ttydefaults.h b/REORG.TODO/sysdeps/generic/sys/ttydefaults.h
new file mode 100644
index 0000000000..683dc8d805
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/ttydefaults.h
@@ -0,0 +1,100 @@
+/*-
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ttydefaults.h	8.4 (Berkeley) 1/21/94
+ */
+
+/*
+ * System wide defaults for terminal state.  4.4 BSD/generic GNU version.
+ */
+#ifndef _SYS_TTYDEFAULTS_H_
+#define	_SYS_TTYDEFAULTS_H_
+
+/*
+ * Defaults on "first" open.
+ */
+#define	TTYDEF_IFLAG	(BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
+#define TTYDEF_OFLAG	(OPOST | ONLCR | OXTABS)
+#define TTYDEF_LFLAG	(ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
+#define TTYDEF_CFLAG	(CREAD | CS7 | PARENB | HUPCL)
+#define TTYDEF_SPEED	(B9600)
+
+/*
+ * Control Character Defaults
+ */
+#define CTRL(x)	(x&037)
+#define	CEOF		CTRL('d')
+#ifdef _POSIX_VDISABLE
+# define CEOL		_POSIX_VDISABLE
+#else
+# define CEOL		((unsigned char)'\377')	/* XXX avoid _POSIX_VDISABLE */
+#endif
+#define	CERASE		0177
+#define	CINTR		CTRL('c')
+#ifdef _POSIX_VDISABLE
+# define CSTATUS	_POSIX_VDISABLE
+#else
+# define CSTATUS	((unsigned char)'\377')	/* XXX avoid _POSIX_VDISABLE */
+#endif
+#define	CKILL		CTRL('u')
+#define	CMIN		1
+#define	CQUIT		034		/* FS, ^\ */
+#define	CSUSP		CTRL('z')
+#define	CTIME		0
+#define	CDSUSP		CTRL('y')
+#define	CSTART		CTRL('q')
+#define	CSTOP		CTRL('s')
+#define	CLNEXT		CTRL('v')
+#define	CDISCARD 	CTRL('o')
+#define	CWERASE 	CTRL('w')
+#define	CREPRINT 	CTRL('r')
+#define	CEOT		CEOF
+/* compat */
+#define	CBRK		CEOL
+#define CRPRNT		CREPRINT
+#define	CFLUSH		CDISCARD
+
+/* PROTECTED INCLUSION ENDS HERE */
+#endif /* !_SYS_TTYDEFAULTS_H_ */
+
+/*
+ * #define TTYDEFCHARS to include an array of default control characters.
+ */
+#ifdef TTYDEFCHARS
+cc_t	ttydefchars[NCCS] = {
+	CEOF,	CEOL,	CEOL,	CERASE, CWERASE, CKILL, CREPRINT,
+	_POSIX_VDISABLE, CINTR,	CQUIT,	CSUSP,	CDSUSP,	CSTART,	CSTOP,	CLNEXT,
+	CDISCARD, CMIN,	CTIME,  CSTATUS, _POSIX_VDISABLE
+};
+#undef TTYDEFCHARS
+#endif
diff --git a/REORG.TODO/sysdeps/generic/sys/ucontext.h b/REORG.TODO/sysdeps/generic/sys/ucontext.h
new file mode 100644
index 0000000000..a64460c9ae
--- /dev/null
+++ b/REORG.TODO/sysdeps/generic/sys/ucontext.h
@@ -0,0 +1,44 @@
+/* Data structures for user-level context switching.  Generic version.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* This file's definitions suffice for any platform where all
+   the machine-specific state is described in `struct sigcontext'.  */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H	1
+
+#include <features.h>
+
+#include <bits/types/sigset_t.h>
+#include <bits/sigcontext.h>
+#include <bits/types/stack_t.h>
+
+
+typedef struct sigcontext mcontext_t;
+
+/* Userlevel context.  */
+typedef struct ucontext
+  {
+    unsigned long int uc_flags;
+    struct ucontext *uc_link;
+    stack_t uc_stack;
+    mcontext_t uc_mcontext;
+    sigset_t uc_sigmask;
+  } ucontext_t;
+
+#endif /* sys/ucontext.h */