PERFORCE change 28428 for review
Marcel Moolenaar
marcel at FreeBSD.org
Mon Apr 7 02:17:29 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=28428
Change 28428 by marcel at marcel_nfs on 2003/04/07 02:16:58
Fix usage of _thread_printf(). Add a file descriptor in
two cases and use STDERR_FILENO in all cases.
Affected files ...
.. //depot/projects/ia64/lib/libthr/thread/thr_create.c#2 edit
.. //depot/projects/ia64/lib/libthr/thread/thr_gc.c#2 edit
.. //depot/projects/ia64/lib/libthr/thread/thr_kern.c#2 edit
Differences ...
==== //depot/projects/ia64/lib/libthr/thread/thr_create.c#2 (text+ko) ====
@@ -187,7 +187,7 @@
ret = thr_create(&new_thread->ctx, &new_thread->thr_id, flags);
if (ret != 0) {
- _thread_printf("thr_create() == %d\n", ret);
+ _thread_printf(STDERR_FILENO, "thr_create() == %d\n", ret);
PANIC("thr_create");
}
==== //depot/projects/ia64/lib/libthr/thread/thr_gc.c#2 (text+ko) ====
@@ -178,7 +178,7 @@
*/
if ((ret = pthread_cond_timedwait(&_gc_cond,
&_gc_mutex, &abstime)) != 0 && ret != ETIMEDOUT) {
- _thread_printf("ret = %d", ret);
+ _thread_printf(STDERR_FILENO, "ret = %d", ret);
PANIC("gc cannot wait for a signal");
}
}
==== //depot/projects/ia64/lib/libthr/thread/thr_kern.c#2 (text+ko) ====
@@ -34,6 +34,7 @@
#include <pthread.h>
#include <signal.h>
#include <errno.h>
+#include <unistd.h>
#include "thr_private.h"
@@ -69,14 +70,15 @@
#if 0
error = __sys_sigprocmask(SIG_SETMASK, &set, &sav);
if (error) {
- _thread_printf(0, "GIANT_LOCK: sig err %d\n", errno);
+ _thread_printf(STDERR_FILENO, "GIANT_LOCK: sig err %d\n",
+ errno);
abort();
}
#endif
error = umtx_lock(&_giant_mutex, pthread->thr_id);
if (error) {
- _thread_printf(0, "GIANT_LOCK: %d\n", errno);
+ _thread_printf(STDERR_FILENO, "GIANT_LOCK: %d\n", errno);
abort();
}
@@ -99,7 +101,7 @@
error = umtx_unlock(&_giant_mutex, pthread->thr_id);
if (error) {
- _thread_printf(0, "GIANT_UNLOCK: %d\n", errno);
+ _thread_printf(STDERR_FILENO, "GIANT_UNLOCK: %d\n", errno);
abort();
}
@@ -109,7 +111,8 @@
*/
error = __sys_sigprocmask(SIG_SETMASK, &set, NULL);
if (error) {
- _thread_printf(0, "GIANT_UNLOCK: sig err %d\n", errno);
+ _thread_printf(STDERR_FILENO, "GIANT_UNLOCK: sig err %d\n",
+ errno);
abort();
}
#endif
More information about the p4-projects
mailing list