diff options
Diffstat (limited to 'bits/types')
-rw-r--r-- | bits/types/__sigset_t.h | 7 | ||||
-rw-r--r-- | bits/types/error_t.h | 24 | ||||
-rw-r--r-- | bits/types/sigevent_t.h | 17 | ||||
-rw-r--r-- | bits/types/siginfo_t.h | 21 | ||||
-rw-r--r-- | bits/types/stack_t.h | 33 | ||||
-rw-r--r-- | bits/types/struct_sched_param.h | 28 |
6 files changed, 130 insertions, 0 deletions
diff --git a/bits/types/__sigset_t.h b/bits/types/__sigset_t.h new file mode 100644 index 0000000000..c90d760a6e --- /dev/null +++ b/bits/types/__sigset_t.h @@ -0,0 +1,7 @@ +#ifndef ____sigset_t_defined +#define ____sigset_t_defined 1 + +/* A `sigset_t' has a bit for each signal. */ +typedef unsigned long int __sigset_t; + +#endif diff --git a/bits/types/error_t.h b/bits/types/error_t.h new file mode 100644 index 0000000000..8ea7a8149e --- /dev/null +++ b/bits/types/error_t.h @@ -0,0 +1,24 @@ +/* Define error_t. + Copyright (C) 1991-2018 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 __error_t_defined +# define __error_t_defined 1 + +typedef int error_t; + +#endif diff --git a/bits/types/sigevent_t.h b/bits/types/sigevent_t.h new file mode 100644 index 0000000000..5611268610 --- /dev/null +++ b/bits/types/sigevent_t.h @@ -0,0 +1,17 @@ +#ifndef __sigevent_t_defined +#define __sigevent_t_defined 1 + +#include <bits/types.h> +#include <bits/types/__sigval_t.h> + +/* Structure to transport application-defined values with signals. */ +typedef struct sigevent + { + __sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + void (*sigev_notify_function) (__sigval_t); /* Function to start. */ + void *sigev_notify_attributes; /* Really pthread_attr_t.*/ + } sigevent_t; + +#endif diff --git a/bits/types/siginfo_t.h b/bits/types/siginfo_t.h new file mode 100644 index 0000000000..450cb9431f --- /dev/null +++ b/bits/types/siginfo_t.h @@ -0,0 +1,21 @@ +#ifndef __siginfo_t_defined +#define __siginfo_t_defined 1 + +#include <bits/types.h> +#include <bits/types/__sigval_t.h> + +typedef struct + { + int si_signo; /* Signal number. */ + int si_errno; /* If non-zero, an errno value associated with + this signal, as defined in <errno.h>. */ + int si_code; /* Signal code. */ + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + void *si_addr; /* Address of faulting instruction. */ + int si_status; /* Exit value or signal. */ + long int si_band; /* Band event for SIGPOLL. */ + __sigval_t si_value; /* Signal value. */ + } siginfo_t; + +#endif diff --git a/bits/types/stack_t.h b/bits/types/stack_t.h new file mode 100644 index 0000000000..d57f94c211 --- /dev/null +++ b/bits/types/stack_t.h @@ -0,0 +1,33 @@ +/* Define stack_t. + Copyright (C) 1998-2018 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 __stack_t_defined +#define __stack_t_defined 1 + +#define __need_size_t +#include <stddef.h> + +/* Structure describing a signal stack. */ +typedef struct + { + void *ss_sp; + size_t ss_size; + int ss_flags; + } stack_t; + +#endif diff --git a/bits/types/struct_sched_param.h b/bits/types/struct_sched_param.h new file mode 100644 index 0000000000..2f24d426fb --- /dev/null +++ b/bits/types/struct_sched_param.h @@ -0,0 +1,28 @@ +/* Sched parameter structure. Generic version. + Copyright (C) 1996-2018 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 _BITS_TYPES_STRUCT_SCHED_PARAM +#define _BITS_TYPES_STRUCT_SCHED_PARAM 1 + +/* Data structure to describe a process' schedulability. */ +struct sched_param +{ + int sched_priority; +}; + +#endif /* bits/types/struct_sched_param.h */ |