diff options
author | cem <cem@FreeBSD.org> | 2016-06-01 16:09:56 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2016-06-01 16:09:56 +0000 |
commit | d29b361251aaf275981b66d83ab2772d5def98b0 (patch) | |
tree | c0e65579bfa6d45a15cf69543e4c8c6408bf857e /lib/libthr/thread/thr_private.h | |
parent | 18db3d0c115de478ad7684f9afba0ca2da68c96e (diff) | |
download | FreeBSD-src-d29b361251aaf275981b66d83ab2772d5def98b0.zip FreeBSD-src-d29b361251aaf275981b66d83ab2772d5def98b0.tar.gz |
libthr: Add vprintf variant of _thread_printf, formatted PANIC()
No ABI change.
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6672
Diffstat (limited to 'lib/libthr/thread/thr_private.h')
-rw-r--r-- | lib/libthr/thread/thr_private.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 7dd4580..02b575d 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -86,7 +86,7 @@ TAILQ_HEAD(mutex_queue, pthread_mutex); /* * Kernel fatal error handler macro. */ -#define PANIC(string) _thread_exit(__FILE__,__LINE__,string) +#define PANIC(args...) _thread_exitf(__FILE__, __LINE__, ##args) /* Output debug messages like this: */ #define stdout_debug(args...) _thread_printf(STDOUT_FILENO, ##args) @@ -778,6 +778,8 @@ void _mutex_leave_robust(struct pthread *curthread, struct pthread_mutex *m) void _libpthread_init(struct pthread *) __hidden; struct pthread *_thr_alloc(struct pthread *) __hidden; void _thread_exit(const char *, int, const char *) __hidden __dead2; +void _thread_exitf(const char *, int, const char *, ...) __hidden __dead2 + __printflike(3, 4); int _thr_ref_add(struct pthread *, struct pthread *, int) __hidden; void _thr_ref_delete(struct pthread *, struct pthread *) __hidden; void _thr_ref_delete_unlocked(struct pthread *, struct pthread *) __hidden; @@ -789,7 +791,8 @@ void _thr_stack_free(struct pthread_attr *) __hidden; void _thr_free(struct pthread *, struct pthread *) __hidden; void _thr_gc(struct pthread *) __hidden; void _thread_cleanupspecific(void) __hidden; -void _thread_printf(int, const char *, ...) __hidden; +void _thread_printf(int, const char *, ...) __hidden __printflike(2, 3); +void _thread_vprintf(int, const char *, va_list) __hidden; void _thr_spinlock_init(void) __hidden; void _thr_cancel_enter(struct pthread *) __hidden; void _thr_cancel_enter2(struct pthread *, int) __hidden; |