Date: Mon, 7 Apr 2003 02:17:27 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 28428 for review Message-ID: <200304070917.h379HRH0058115@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=28428 Change 28428 by marcel@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304070917.h379HRH0058115>