diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-12-29 15:01:46 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-12-29 15:01:46 +0100 |
commit | 218db6679aea0dcf05fb60566cef6e18f706d9ba (patch) | |
tree | 3099f55335743748ff18bd435e4de25b22c8f54a /sysdeps/pthread | |
parent | 0a69b89843ec466fa20c994a29d13de6a45c3acb (diff) | |
parent | 7d4a84731cd80a1ef711c83535c6340f0e2b143f (diff) |
Merge branch 'master' into 2.262.26
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r-- | sysdeps/pthread/bits/pthreadtypes.h | 3 | ||||
-rw-r--r-- | sysdeps/pthread/bits/thread-shared-types.h | 24 | ||||
-rw-r--r-- | sysdeps/pthread/pthread.h | 15 |
3 files changed, 41 insertions, 1 deletions
diff --git a/sysdeps/pthread/bits/pthreadtypes.h b/sysdeps/pthread/bits/pthreadtypes.h index 70368ff..3e44d6b 100644 --- a/sysdeps/pthread/bits/pthreadtypes.h +++ b/sysdeps/pthread/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000-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 @@ -25,5 +25,6 @@ #define _BITS_PTHREADTYPES_H 1 #include <pthread/pthreadtypes.h> +#include <bits/thread-shared-types.h> #endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/pthread/bits/thread-shared-types.h b/sysdeps/pthread/bits/thread-shared-types.h new file mode 100644 index 0000000..369fead --- /dev/null +++ b/sysdeps/pthread/bits/thread-shared-types.h @@ -0,0 +1,24 @@ +/* Common threading primitives definitions for both POSIX and C11. + Copyright (C) 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 _THREAD_SHARED_TYPES_H +#define _THREAD_SHARED_TYPES_H 1 + +#include <bits/pthreadtypes-arch.h> + +#endif /* _THREAD_SHARED_TYPES_H */ diff --git a/sysdeps/pthread/pthread.h b/sysdeps/pthread/pthread.h index 1d4d3c7..8e65b05 100644 --- a/sysdeps/pthread/pthread.h +++ b/sysdeps/pthread/pthread.h @@ -1,7 +1,22 @@ #ifndef _PTHREAD_H #include <pthread/pthread.h> +/* These represent the interface used by glibc itself. */ + extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); +typedef struct __cthread *__cthread_t; +typedef int __cthread_key_t; +typedef void * (*__cthread_fn_t)(void *__arg); + +__cthread_t __cthread_fork (__cthread_fn_t, void *); +void __cthread_detach (__cthread_t); +int __cthread_keycreate (__cthread_key_t *); +int __cthread_getspecific (__cthread_key_t, void **); +int __cthread_setspecific (__cthread_key_t, void *); + +int __pthread_getattr_np (pthread_t, pthread_attr_t *); +int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); + #endif |