summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-04-09 02:57:42 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-04-09 02:57:42 +0000
commit64c374962577b0b1efc3c9c7d82a1111f5313f5b (patch)
tree42c11d85ab804b2d9d857daf98ed200f17eb28b0 /lib
parent7da477872a5536abc18c76ad8f2e58ce8efca621 (diff)
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')
-rw-r--r--lib/libpthread/include/pthread_np.h4
-rw-r--r--lib/libpthread/shlib_version2
-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
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/libpthread/include/pthread_np.h b/lib/libpthread/include/pthread_np.h
index 0c57ab688aa..270e377be6e 100644
--- a/lib/libpthread/include/pthread_np.h
+++ b/lib/libpthread/include/pthread_np.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread_np.h,v 1.8 2004/05/01 22:15:10 marc Exp $ */
+/* $OpenBSD: pthread_np.h,v 1.9 2006/04/09 02:57:41 krw Exp $ */
/*
* Copyright (c) 1996-98 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -52,7 +52,7 @@ int pthread_suspend_np(pthread_t);
void pthread_suspend_all_np(void);
int pthread_mutexattr_getkind_np(pthread_mutexattr_t);
int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);
-void pthread_set_name_np(pthread_t, char *);
+void pthread_set_name_np(pthread_t, const char *);
int pthread_stackseg_np(pthread_t, stack_t *);
int pthread_switch_add_np(pthread_switch_routine_t);
int pthread_switch_delete_np(pthread_switch_routine_t);
diff --git a/lib/libpthread/shlib_version b/lib/libpthread/shlib_version
index 689bf7b8582..1c51894bdac 100644
--- a/lib/libpthread/shlib_version
+++ b/lib/libpthread/shlib_version
@@ -1,2 +1,2 @@
major=6
-minor=2
+minor=3
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;