This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC v2][PATCH 19/27] New gen-as-const-headers infinity-nptl{,_db}-constants.h
- From: Gary Benson <gbenson at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 13 Jun 2016 11:38:23 +0100
- Subject: [RFC v2][PATCH 19/27] New gen-as-const-headers infinity-nptl{,_db}-constants.h
- Authentication-results: sourceware.org; auth=none
- References: <1465814311-31470-1-git-send-email-gbenson at redhat dot 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 <nptl_db/proc_service.h>
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 <nptl_db/thread_db.h>
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 <pthreadP.h>
+
+-- 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 <thread_db.h>
+#include <proc_service.h>
+
+-- 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
--
1.7.1