This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC v2][PATCH 23/27] New Infinity header infinity-nptl.i8


This commit adds the new Infinity header infinity-nptl.i8, which
contains definitions common to all libpthread Infinity notes.
---
 nptl/infinity-nptl.i8 |   58 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100644 nptl/infinity-nptl.i8

diff --git a/nptl/infinity-nptl.i8 b/nptl/infinity-nptl.i8
new file mode 100644
index 0000000..1ca320c
--- /dev/null
+++ b/nptl/infinity-nptl.i8
@@ -0,0 +1,58 @@
+/* Common definitions for NPTL Infinity functions.
+   Copyright (C) 2015-2016 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/>.  */
+
+/* libpthread and libthread_db generated constants.  */
+#include "infinity-nptl-constants.h"
+#include "infinity-nptl_db-constants.h"
+
+/* Wordsize of the platform, in bits.  */
+wordsize __WORDSIZE
+
+/* Process and LWP IDs.  */
+typedef i32 __pid_t
+typedef __pid_t pid_t
+typedef __pid_t lwpid_t
+
+/* Error codes defined in thread_db.h and proc_service.h.  */
+typedef i32 td_err_e
+typedef i32 ps_err_e
+
+/* A pointer to a struct pthread.  */
+typedef ptr pthread_t
+
+/* Possible thread states.  */
+typedef i32 td_thr_state_e
+
+/* Callback for iteration over threads.  */
+typedef func int (pthread_t, opaque) thr_iter_f
+
+/* The two thread lists.  */
+extern ptr __stack_user
+extern ptr __stack_used
+
+/* Return the PID of the process being accessed.  */
+extern func pid_t () procservice::getpid
+
+/* Fetch the value stored in the specified register of the given LWP.
+   The "int" parameter specifies an offset in bytes into prgregset_t.  */
+extern func ps_err_e, int (lwpid_t, int) procservice::get_register
+
+/* Fetch the special per-thread address associated with the given
+   LWP.  This call is not available on all platforms.  The meaning
+   of the "int" parameter is machine-dependent. */
+extern func ps_err_e, ptr (lwpid_t, int) procservice::get_thread_area
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]