summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2006-04-09 02:57:41 +0000
committerkrw <krw@openbsd.org>2006-04-09 02:57:41 +0000
commit2ca7b264da9a85eff7c8914e7a3d28ed21138450 (patch)
tree5c97d14cdad6072f13b9682081f3d4dab887e7ea /lib/libpthread/uthread
parentregen (diff)
downloadwireguard-openbsd-2ca7b264da9a85eff7c8914e7a3d28ed21138450.tar.xz
wireguard-openbsd-2ca7b264da9a85eff7c8914e7a3d28ed21138450.zip
Change a debug interface to take const char pointers so we don't ave
to cast away constness whenever we want to pass in a string that is already const -- we copy the string if we want to use it, so having it be non-const in the first place does not make any sense. From tholo@ ok tedu@
Diffstat (limited to 'lib/libpthread/uthread')
-rw-r--r--lib/libpthread/uthread/uthread_gc.c4
-rw-r--r--lib/libpthread/uthread/uthread_info_openbsd.c4
-rw-r--r--lib/libpthread/uthread/uthread_init.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libpthread/uthread/uthread_gc.c b/lib/libpthread/uthread/uthread_gc.c
index fdcbff1ff07..6e527de2873 100644
--- a/lib/libpthread/uthread/uthread_gc.c
+++ b/lib/libpthread/uthread/uthread_gc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_gc.c,v 1.15 2005/10/29 18:07:55 krw Exp $ */
+/* $OpenBSD: uthread_gc.c,v 1.16 2006/04/09 02:57:41 krw Exp $ */
/*
* Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -69,7 +69,7 @@ _thread_gc(pthread_addr_t arg)
f_debug = (getenv("LIBPTHREAD_DEBUG") != NULL);
/* Set the name of this thread. */
- pthread_set_name_np(curthread, (char *)"GC");
+ pthread_set_name_np(curthread, "GC");
while (!f_done) {
/* Check if debugging this application. */
diff --git a/lib/libpthread/uthread/uthread_info_openbsd.c b/lib/libpthread/uthread/uthread_info_openbsd.c
index c7404285eab..1723d80b807 100644
--- a/lib/libpthread/uthread/uthread_info_openbsd.c
+++ b/lib/libpthread/uthread/uthread_info_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_info_openbsd.c,v 1.9 2003/03/20 00:09:21 marc Exp $ */
+/* $OpenBSD: uthread_info_openbsd.c,v 1.10 2006/04/09 02:57:41 krw Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
@@ -460,7 +460,7 @@ _thread_dump_data(const void *addr, int len)
/* Set the thread name for debug: */
void
-pthread_set_name_np(pthread_t thread, char *name)
+pthread_set_name_np(pthread_t thread, const char *name)
{
/* Check if the caller has specified a valid thread: */
if (thread != NULL && thread->magic == PTHREAD_MAGIC) {
diff --git a/lib/libpthread/uthread/uthread_init.c b/lib/libpthread/uthread/uthread_init.c
index c146a71f5e5..6193166856d 100644
--- a/lib/libpthread/uthread/uthread_init.c
+++ b/lib/libpthread/uthread/uthread_init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_init.c,v 1.34 2006/03/06 18:37:53 otto Exp $ */
+/* $OpenBSD: uthread_init.c,v 1.35 2006/04/09 02:57:41 krw Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -274,7 +274,7 @@ _thread_init(void)
_thread_initial->last_active = (long) _sched_ticks;
/* Give it a useful name */
- pthread_set_name_np(_thread_initial, (char *)"main");
+ pthread_set_name_np(_thread_initial, "main");
/* Initialise the rest of the fields: */
_thread_initial->poll_data.nfds = 0;