From fdb8a0be9b3fea36e6c8b471c77d42e0b803720e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 21 Feb 2019 14:33:55 -0300 Subject: Add single-thread.h header This patch move the single-thread syscall optimization defintions from syscall-cancel.h to new header file single-thread.h and also move the cancellation definitions from pthreadP.h to syscall-cancel.h. The idea is just simplify the inclusion of both syscall-cancel.h and single-thread.h (without the requirement of including all pthreadP.h defintions). No semantic changes expected, checked on a build for all major ABIs. * nptl/pthreadP.h (CANCEL_ASYNC, CANCEL_RESET, LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, __libc_enable_asynccancel, __libc_disable_asynccancel, __librt_enable_asynccancel, __libc_disable_asynccancel, __librt_enable_asynccancel, __librt_disable_asynccancel): Move to ... * sysdeps/unix/sysv/linux/sysdep-cancel.h: ... here. (SINGLE_THREAD_P, RTLD_SINGLE_THREAD_P): Move to ... * sysdeps/unix/sysv/linux/single-thread.h: ... here. * sysdeps/generic/single-thread.h: New file. * sysdeps/unix/sysdep.h: Include single-thread.h. * sysdeps/unix/sysv/linux/futex-internal.h: Include sysdep-cancel.h. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise. --- sysdeps/generic/single-thread.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sysdeps/generic/single-thread.h (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/single-thread.h b/sysdeps/generic/single-thread.h new file mode 100644 index 0000000..0a1520e --- /dev/null +++ b/sysdeps/generic/single-thread.h @@ -0,0 +1,24 @@ +/* Single thread optimization, generic version. + Copyright (C) 2019 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 + . */ + +#ifndef _SINGLE_THREAD_H +#define _SINGLE_THREAD_H + +#define SINGLE_THREAD_P (0) + +#endif /* _SINGLE_THREAD_H */ -- cgit v1.1