summaryrefslogtreecommitdiff
path: root/sysdeps/htl/bits/types
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/htl/bits/types')
-rw-r--r--sysdeps/htl/bits/types/__pthread_key.h24
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_attr.h45
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_barrier.h38
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_barrierattr.h31
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_cond.h38
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_condattr.h33
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_mutex.h61
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_mutexattr.h40
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_once.h33
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_rwlock.h45
-rw-r--r--sysdeps/htl/bits/types/struct___pthread_rwlockattr.h31
11 files changed, 419 insertions, 0 deletions
diff --git a/sysdeps/htl/bits/types/__pthread_key.h b/sysdeps/htl/bits/types/__pthread_key.h
new file mode 100644
index 0000000000..8d33e15d97
--- /dev/null
+++ b/sysdeps/htl/bits/types/__pthread_key.h
@@ -0,0 +1,24 @@
+/* Thread specific data. Generic version.
+ Copyright (C) 2002-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___PTHREAD_KEY_H
+#define _BITS_TYPES___PTHREAD_KEY_H 1
+
+typedef int __pthread_key;
+
+#endif /* bits/types/__pthread_key.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_attr.h b/sysdeps/htl/bits/types/struct___pthread_attr.h
new file mode 100644
index 0000000000..3c78291cbf
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_attr.h
@@ -0,0 +1,45 @@
+/* Thread attribute type. Generic version.
+ Copyright (C) 2000-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___PTHREAD_ATTR
+#define _BITS_TYPES_STRUCT___PTHREAD_ATTR 1
+
+#include <bits/types/struct_sched_param.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+enum __pthread_detachstate;
+enum __pthread_inheritsched;
+enum __pthread_contentionscope;
+
+/* This structure describes the attributes of a POSIX thread. Note
+ that not all of them are supported on all systems. */
+struct __pthread_attr
+{
+ struct sched_param __schedparam;
+ void *__stackaddr;
+ size_t __stacksize;
+ size_t __guardsize;
+ enum __pthread_detachstate __detachstate;
+ enum __pthread_inheritsched __inheritsched;
+ enum __pthread_contentionscope __contentionscope;
+ int __schedpolicy;
+};
+
+#endif /* bits/types/struct___pthread_attr.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_barrier.h b/sysdeps/htl/bits/types/struct___pthread_barrier.h
new file mode 100644
index 0000000000..113b624671
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_barrier.h
@@ -0,0 +1,38 @@
+/* Thread barrier attribute type. Generic version.
+ Copyright (C) 2002-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___PTHREAD_BARRIER_H
+#define _BITS_TYPES_STRUCT___PTHREAD_BARRIER_H 1
+
+#include <bits/types/__pthread_spinlock_t.h>
+
+/* This structure describes the attributes of a POSIX barrier. */
+struct __pthread_barrier
+{
+ __pthread_spinlock_t __lock;
+ struct __pthread *__queue; /* List of waiters. */
+ unsigned __pending; /* Number of that still need to wait on
+ barrier. */
+ unsigned __count; /* Number of threads that must wait before
+ barrier is passed. */
+ struct __pthread_barrierattr *__attr;
+ void *__data;
+};
+
+
+#endif /* bits/types/struct___pthread_barrier.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_barrierattr.h b/sysdeps/htl/bits/types/struct___pthread_barrierattr.h
new file mode 100644
index 0000000000..639ef5d5ef
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_barrierattr.h
@@ -0,0 +1,31 @@
+/* Thread barrier attribute type. Generic version.
+ Copyright (C) 2002-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___PTHREAD_BARRIERATTR_H
+#define _BITS_TYPES_STRUCT___PTHREAD_BARRIERATTR_H 1
+
+enum __pthread_process_shared;
+
+/* This structure describes the attributes of a POSIX thread barrier.
+ Note that not all of them are supported on all systems. */
+struct __pthread_barrierattr
+{
+ enum __pthread_process_shared __pshared;
+};
+
+#endif /* bits/types/struct___pthread_barrierattr.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_cond.h b/sysdeps/htl/bits/types/struct___pthread_cond.h
new file mode 100644
index 0000000000..86215191b4
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_cond.h
@@ -0,0 +1,38 @@
+/* Condition type. Generic version.
+ Copyright (C) 2000-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___PTHREAD_COND_H
+#define _BITS_TYPES_STRUCT___PTHREAD_COND_H 1
+
+#include <bits/types/__pthread_spinlock_t.h>
+
+/* User visible part of a condition variable. */
+struct __pthread_cond
+{
+ __pthread_spinlock_t __lock;
+ struct __pthread *__queue;
+ struct __pthread_condattr *__attr;
+ struct __pthread_condimpl *__impl;
+ void *__data;
+};
+
+/* Initializer for a condition variable. */
+#define __PTHREAD_COND_INITIALIZER \
+ { __PTHREAD_SPIN_LOCK_INITIALIZER, NULL, NULL, NULL, NULL }
+
+#endif /* bits/types/struct___pthread_cond.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_condattr.h b/sysdeps/htl/bits/types/struct___pthread_condattr.h
new file mode 100644
index 0000000000..3297e984e3
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_condattr.h
@@ -0,0 +1,33 @@
+/* Condition attribute type. Generic version.
+ Copyright (C) 2002-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___PTHREAD_CONDATTR
+#define _BITS_TYPES_STRUCT___PTHREAD_CONDATTR 1
+
+#include <bits/types.h>
+
+enum __pthread_process_shared;
+
+/* User visible part of a condition attribute variable. */
+struct __pthread_condattr
+{
+ enum __pthread_process_shared __pshared;
+ __clockid_t __clock;
+};
+
+#endif /* bits/types/struct___pthread_condattr.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_mutex.h b/sysdeps/htl/bits/types/struct___pthread_mutex.h
new file mode 100644
index 0000000000..564e6a3159
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_mutex.h
@@ -0,0 +1,61 @@
+/* Mutex type. Generic version.
+
+ Copyright (C) 2000-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___PTHREAD_MUTEX_H
+#define _BITS_TYPES_STRUCT___PTHREAD_MUTEX_H 1
+
+#include <bits/types/__pthread_spinlock_t.h>
+#include <bits/types/struct___pthread_mutexattr.h>
+
+/* User visible part of a mutex. */
+struct __pthread_mutex
+{
+ __pthread_spinlock_t __held;
+ __pthread_spinlock_t __lock;
+ /* In cthreads, mutex_init does not initialized thre third
+ pointer, as such, we cannot rely on its value for anything. */
+ char *__cthreadscompat1;
+ struct __pthread *__queue;
+ struct __pthread_mutexattr *__attr;
+ void *__data;
+ /* Up to this point, we are completely compatible with cthreads
+ and what libc expects. */
+ void *__owner;
+ unsigned __locks;
+ /* If NULL then the default attributes apply. */
+};
+
+/* Initializer for a mutex. N.B. this also happens to be compatible
+ with the cthread mutex initializer. */
+#define __PTHREAD_MUTEX_INITIALIZER \
+ { __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0, 0 }
+
+#define __PTHREAD_ERRORCHECK_MUTEXATTR ((struct __pthread_mutexattr *) ((unsigned long) __PTHREAD_MUTEX_ERRORCHECK + 1))
+
+#define __PTHREAD_ERRORCHECK_MUTEX_INITIALIZER \
+ { __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, \
+ __PTHREAD_ERRORCHECK_MUTEXATTR, 0, 0, 0 }
+
+#define __PTHREAD_RECURSIVE_MUTEXATTR ((struct __pthread_mutexattr *) ((unsigned long) __PTHREAD_MUTEX_RECURSIVE + 1))
+
+#define __PTHREAD_RECURSIVE_MUTEX_INITIALIZER \
+ { __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, \
+ __PTHREAD_RECURSIVE_MUTEXATTR, 0, 0, 0 }
+
+#endif /* bits/types/struct___pthread_mutex.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_mutexattr.h b/sysdeps/htl/bits/types/struct___pthread_mutexattr.h
new file mode 100644
index 0000000000..239b366ab5
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_mutexattr.h
@@ -0,0 +1,40 @@
+/* Mutex attribute type. Generic version.
+ Copyright (C) 2002-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___PTHREAD_MUTEXATTR_H
+#define _BITS_TYPES_STRUCT___PTHREAD_MUTEXATTR_H 1
+
+enum __pthread_mutex_protocol;
+enum __pthread_process_shared;
+enum __pthread_mutex_type;
+
+/* This structure describes the attributes of a POSIX mutex
+ attribute. */
+struct __pthread_mutexattr
+{
+ int __prioceiling;
+ enum __pthread_mutex_protocol __protocol;
+ enum __pthread_process_shared __pshared;
+ enum __pthread_mutex_type __mutex_type;
+};
+
+/* Attributes for a recursive mutex. */
+extern const struct __pthread_mutexattr __pthread_errorcheck_mutexattr;
+extern const struct __pthread_mutexattr __pthread_recursive_mutexattr;
+
+#endif /* bits/types/struct___pthread_mutexattr.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_once.h b/sysdeps/htl/bits/types/struct___pthread_once.h
new file mode 100644
index 0000000000..99fa43b0cb
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_once.h
@@ -0,0 +1,33 @@
+/* Dynamic package initialization data structures. Generic version.
+ Copyright (C) 2002-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___PTHREAD_ONCE_H
+#define _BITS_TYPES_STRUCT___PTHREAD_ONCE_H 1
+
+#include <bits/types/__pthread_spinlock_t.h>
+
+struct __pthread_once
+{
+ int __run;
+ __pthread_spinlock_t __lock;
+};
+
+#define __PTHREAD_ONCE_INIT \
+ (struct __pthread_once) { 0, __PTHREAD_SPIN_LOCK_INITIALIZER }
+
+#endif /* bits/types/struct___pthread_once.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_rwlock.h b/sysdeps/htl/bits/types/struct___pthread_rwlock.h
new file mode 100644
index 0000000000..8bac46a28a
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_rwlock.h
@@ -0,0 +1,45 @@
+/* rwlock type. Generic version.
+ Copyright (C) 2002-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___PTHREAD_RWLOCK_H
+#define _BITS_TYPES_STRUCT___PTHREAD_RWLOCK_H
+
+#include <bits/types/__pthread_spinlock_t.h>
+
+/* User visible part of a rwlock. If __held is not held and readers
+ is 0, then the lock is unlocked. If __held is held and readers is
+ 0, then the lock is held by a writer. If __held is held and
+ readers is greater than 0, then the lock is held by READERS
+ readers. */
+struct __pthread_rwlock
+{
+ __pthread_spinlock_t __held;
+ __pthread_spinlock_t __lock;
+ int __readers;
+ struct __pthread *__readerqueue;
+ struct __pthread *__writerqueue;
+ struct __pthread_rwlockattr *__attr;
+ void *__data;
+};
+
+/* Initializer for a rwlock. */
+#define __PTHREAD_RWLOCK_INITIALIZER \
+ { __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0 }
+
+
+#endif /* bits/types/struct___pthread_rwlock.h */
diff --git a/sysdeps/htl/bits/types/struct___pthread_rwlockattr.h b/sysdeps/htl/bits/types/struct___pthread_rwlockattr.h
new file mode 100644
index 0000000000..8bafba6ac3
--- /dev/null
+++ b/sysdeps/htl/bits/types/struct___pthread_rwlockattr.h
@@ -0,0 +1,31 @@
+/* Thread rwlock attribute type. Generic version.
+ Copyright (C) 2002-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___PTHREAD_RWLOCKATTR_H
+#define _BITS_TYPES_STRUCT___PTHREAD_RWLOCKATTR_H 1
+
+enum __pthread_process_shared;
+
+/* This structure describes the attributes of a POSIX thread rwlock.
+ Note that not all of them are supported on all systems. */
+struct __pthread_rwlockattr
+{
+ enum __pthread_process_shared __pshared;
+};
+
+#endif /* bits/types/struct___pthread_rwlockattr.h */