From patchwork Mon Jun 13 10:38:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 13029 Received: (qmail 10166 invoked by alias); 13 Jun 2016 10:48:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 9749 invoked by uid 89); 13 Jun 2016 10:48:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=20152016, 1, 58, 2015-2016, states X-HELO: mx1.redhat.com From: Gary Benson To: libc-alpha@sourceware.org Subject: [RFC v2][PATCH 23/27] New Infinity header infinity-nptl.i8 Date: Mon, 13 Jun 2016 11:38:27 +0100 Message-Id: <1465814311-31470-24-git-send-email-gbenson@redhat.com> In-Reply-To: <1465814311-31470-1-git-send-email-gbenson@redhat.com> References: <1465814311-31470-1-git-send-email-gbenson@redhat.com> 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 + . */ + +/* 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