From patchwork Mon Jun 13 10:38:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 13038 Received: (qmail 117992 invoked by alias); 13 Jun 2016 11:18:31 -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 117869 invoked by uid 89); 13 Jun 2016 11:18:30 -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= X-HELO: mx1.redhat.com From: Gary Benson To: libc-alpha@sourceware.org Subject: [RFC v2][PATCH 19/27] New gen-as-const-headers infinity-nptl{, _db}-constants.h Date: Mon, 13 Jun 2016 11:38:23 +0100 Message-Id: <1465814311-31470-20-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 two new generated assembler constants headers to export constants used while building libpthread.so and libthread_db.so. It also adds a rule to build them to nptl/Makefile. I would prefer to have infinity-nptl_db-constants.sym in nptl_db and have it built by nptl_db/Makefile but the ordering of the build seems to make this impossible: nptl_db needs to be built after nptl, but infinity-nptl_db-constants.h is required to build the infinity notes for libpthread.so. If it's possible to change this then I will. In the meantime I had to add breadcrumb header files for nptl_db's proc_service.h and thread_db.h for use during the build. --- include/proc_service.h | 1 + include/thread_db.h | 1 + nptl/Makefile | 4 +++- nptl/infinity-nptl-constants.sym | 26 ++++++++++++++++++++++++++ nptl/infinity-nptl_db-constants.sym | 24 ++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 1 deletions(-) create mode 100644 include/proc_service.h create mode 100644 include/thread_db.h create mode 100644 nptl/infinity-nptl-constants.sym create mode 100644 nptl/infinity-nptl_db-constants.sym diff --git a/include/proc_service.h b/include/proc_service.h new file mode 100644 index 0000000..325082e --- /dev/null +++ b/include/proc_service.h @@ -0,0 +1 @@ +#include diff --git a/include/thread_db.h b/include/thread_db.h new file mode 100644 index 0000000..518d79e --- /dev/null +++ b/include/thread_db.h @@ -0,0 +1 @@ +#include diff --git a/nptl/Makefile b/nptl/Makefile index dc3ccab..63976ec 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -303,7 +303,9 @@ tests-nolibpthread = tst-unload gen-as-const-headers = pthread-errnos.sym \ lowlevelcond.sym lowlevelrwlock.sym \ unwindbuf.sym \ - lowlevelrobustlock.sym pthread-pi-defines.sym + lowlevelrobustlock.sym pthread-pi-defines.sym \ + infinity-nptl-constants.sym \ + infinity-nptl_db-constants.sym LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst diff --git a/nptl/infinity-nptl-constants.sym b/nptl/infinity-nptl-constants.sym new file mode 100644 index 0000000..4c9fdfd --- /dev/null +++ b/nptl/infinity-nptl-constants.sym @@ -0,0 +1,26 @@ +#include + +-- general information + +__WORDSIZE + +-- structure offsets + +LIST_T_NEXT_OFFSET offsetof (list_t, next) +PTHREAD_CANCELHANDLING_OFFSET offsetof (struct pthread, cancelhandling) +PTHREAD_LIST_OFFSET offsetof (struct pthread, list) +PTHREAD_PID_OFFSET offsetof (struct pthread, pid) +PTHREAD_TID_OFFSET offsetof (struct pthread, tid) +PTHREAD_SCHEDPARAM_SCHED_PRIORITY_OFFSET offsetof (struct pthread, schedparam) + offsetof (struct sched_param, __sched_priority) +PTHREAD_SCHEDPOLICY_OFFSET offsetof (struct pthread, schedpolicy) + +-- scheduling algorithms + +SCHED_OTHER +SCHED_FIFO +SCHED_RR + +-- cancellation processing flags + +EXITING_BITMASK +TERMINATED_BITMASK diff --git a/nptl/infinity-nptl_db-constants.sym b/nptl/infinity-nptl_db-constants.sym new file mode 100644 index 0000000..56abf98 --- /dev/null +++ b/nptl/infinity-nptl_db-constants.sym @@ -0,0 +1,24 @@ +#include +#include + +-- td_err_e values + +TD_OK +TD_ERR +TD_DBERR +TD_NOCAPAB + +-- ps_err_e values + +PS_OK +PS_ERR + +-- td_thr_state_e values + +TD_THR_UNKNOWN +TD_THR_ACTIVE +TD_THR_ZOMBIE + +-- Flags for thr_iter + +TD_THR_LOWEST_PRIORITY