* [PATCH][v2] [BZ#20311] Update and install proc_service.h
@ 2016-07-26 23:33 Tom Tromey
2016-07-27 11:21 ` Pedro Alves
2016-08-03 11:05 ` Florian Weimer
0 siblings, 2 replies; 5+ messages in thread
From: Tom Tromey @ 2016-07-26 23:33 UTC (permalink / raw)
To: libc-alpha; +Cc: Tom Tromey
This adds an include guard and __BEGIN/__END_DECLS to proc_service.h,
removes some extraneous "const"s, and then arranges to install the
header. The idea here is to make it more convenient to implement the
proc_service.h API. This fixes BZ#20311.
Tested by rebuilding and installing; then examining the output of
"gcc -E", both for C and C++, with the installed header.
---
ChangeLog | 10 ++++++++++
nptl_db/Makefile | 2 +-
nptl_db/proc_service.h | 19 ++++++++++++++-----
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d7b67d6..848a4cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-07-26 Tom Tromey <tom@tromey.com>
+
+ [BZ #20311]
+ * nptl_db/Makefile (headers): Add proc_service.h.
+ * nptl_db/proc_service.h: Add include guard. Use
+ __BEGIN/__END_DECLS.
+ (ps_get_thread_area, ps_pstop, ps_pcontinue, ps_lstop)
+ (ps_lcontinue): Remove "const" from "struct ps_prochandle *"
+ arguments.
+
2016-07-21 Gustavo Romero <gromero@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Fix missing verb
diff --git a/nptl_db/Makefile b/nptl_db/Makefile
index 849a73f..bc20440 100644
--- a/nptl_db/Makefile
+++ b/nptl_db/Makefile
@@ -26,7 +26,7 @@ nptl_db-version = 1.0
extra-libs = libthread_db
extra-libs-others := $(extra-libs)
-headers = thread_db.h sys/procfs.h
+headers = proc_service.h thread_db.h sys/procfs.h
libthread_db-routines = td_init td_log td_ta_new td_ta_delete \
td_ta_get_nthreads td_ta_get_ph \
diff --git a/nptl_db/proc_service.h b/nptl_db/proc_service.h
index c1c139f..109962d 100644
--- a/nptl_db/proc_service.h
+++ b/nptl_db/proc_service.h
@@ -16,9 +16,14 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _PROC_SERVICE_H
+#define _PROC_SERVICE_H 1
+
/* The definitions in this file must correspond to those in the debugger. */
#include <sys/procfs.h>
+__BEGIN_DECLS
+
/* Functions in this interface return one of these status codes. */
typedef enum
{
@@ -64,7 +69,7 @@ extern pid_t ps_getpid (struct ps_prochandle *);
/* Fetch the special per-thread address associated with the given LWP.
This call is only used on a few platforms (most use a normal register).
The meaning of the `int' parameter is machine-dependent. */
-extern ps_err_e ps_get_thread_area (const struct ps_prochandle *,
+extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
lwpid_t, int, psaddr_t *);
@@ -78,9 +83,13 @@ extern ps_err_e ps_pglobal_lookup (struct ps_prochandle *,
/* Stop or continue the entire process. */
-extern ps_err_e ps_pstop (const struct ps_prochandle *);
-extern ps_err_e ps_pcontinue (const struct ps_prochandle *);
+extern ps_err_e ps_pstop (struct ps_prochandle *);
+extern ps_err_e ps_pcontinue (struct ps_prochandle *);
/* Stop or continue the given LWP alone. */
-extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t);
-extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t);
+extern ps_err_e ps_lstop (struct ps_prochandle *, lwpid_t);
+extern ps_err_e ps_lcontinue (struct ps_prochandle *, lwpid_t);
+
+__END_DECLS
+
+#endif /* proc_service.h */
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][v2] [BZ#20311] Update and install proc_service.h
2016-07-26 23:33 [PATCH][v2] [BZ#20311] Update and install proc_service.h Tom Tromey
@ 2016-07-27 11:21 ` Pedro Alves
2016-08-03 11:05 ` Florian Weimer
1 sibling, 0 replies; 5+ messages in thread
From: Pedro Alves @ 2016-07-27 11:21 UTC (permalink / raw)
To: Tom Tromey, libc-alpha
On 07/26/2016 11:57 PM, Tom Tromey wrote:
> This adds an include guard and __BEGIN/__END_DECLS to proc_service.h,
> removes some extraneous "const"s, and then arranges to install the
> header. The idea here is to make it more convenient to implement the
> proc_service.h API. This fixes BZ#20311.
>
> Tested by rebuilding and installing; then examining the output of
> "gcc -E", both for C and C++, with the installed header.
Looks good to me. Thanks for doing this.
Pedro Alves
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][v2] [BZ#20311] Update and install proc_service.h
2016-07-26 23:33 [PATCH][v2] [BZ#20311] Update and install proc_service.h Tom Tromey
2016-07-27 11:21 ` Pedro Alves
@ 2016-08-03 11:05 ` Florian Weimer
2016-08-03 13:54 ` Tom Tromey
1 sibling, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2016-08-03 11:05 UTC (permalink / raw)
To: Tom Tromey; +Cc: libc-alpha
On 07/27/2016 12:57 AM, Tom Tromey wrote:
> +2016-07-26 Tom Tromey <tom@tromey.com>
> +
> + [BZ #20311]
> + * nptl_db/Makefile (headers): Add proc_service.h.
> + * nptl_db/proc_service.h: Add include guard. Use
> + __BEGIN/__END_DECLS.
> + (ps_get_thread_area, ps_pstop, ps_pcontinue, ps_lstop)
> + (ps_lcontinue): Remove "const" from "struct ps_prochandle *"
> + arguments.
Do we want the location <proc_service.h>? It's what Solaris uses, and
there is already a <link.h>, so I think the location is okay.
Tom, can you push this to master?
Thanks,
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][v2] [BZ#20311] Update and install proc_service.h
2016-08-03 11:05 ` Florian Weimer
@ 2016-08-03 13:54 ` Tom Tromey
2016-08-03 14:35 ` Florian Weimer
0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2016-08-03 13:54 UTC (permalink / raw)
To: Florian Weimer; +Cc: Tom Tromey, libc-alpha
>>>>> "Florian" == Florian Weimer <fweimer@redhat.com> writes:
Florian> On 07/27/2016 12:57 AM, Tom Tromey wrote:
>> +2016-07-26 Tom Tromey <tom@tromey.com>
>> +
>> + [BZ #20311]
>> + * nptl_db/Makefile (headers): Add proc_service.h.
>> + * nptl_db/proc_service.h: Add include guard. Use
>> + __BEGIN/__END_DECLS.
>> + (ps_get_thread_area, ps_pstop, ps_pcontinue, ps_lstop)
>> + (ps_lcontinue): Remove "const" from "struct ps_prochandle *"
>> + arguments.
Florian> Do we want the location <proc_service.h>? It's what Solaris uses, and
Florian> there is already a <link.h>, so I think the location is okay.
I think so, given <thread_db.h> as well.
Florian> Tom, can you push this to master?
I don't have write access.
thanks,
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][v2] [BZ#20311] Update and install proc_service.h
2016-08-03 13:54 ` Tom Tromey
@ 2016-08-03 14:35 ` Florian Weimer
0 siblings, 0 replies; 5+ messages in thread
From: Florian Weimer @ 2016-08-03 14:35 UTC (permalink / raw)
To: Tom Tromey; +Cc: GNU C Library
On 08/03/2016 03:54 PM, Tom Tromey wrote:
> Florian> Tom, can you push this to master?
>
> I don't have write access.
I have spoofed a commit in your name.
Thanks,
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-08-03 14:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26 23:33 [PATCH][v2] [BZ#20311] Update and install proc_service.h Tom Tromey
2016-07-27 11:21 ` Pedro Alves
2016-08-03 11:05 ` Florian Weimer
2016-08-03 13:54 ` Tom Tromey
2016-08-03 14:35 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).