void * cast the probe functions that take more than 5 uintptr_t arguments

(dtrace_probe takes 5).
This commit is contained in:
christos 2019-10-16 15:08:09 +00:00
parent 9fb3a182b9
commit 5daffada21

View File

@ -1,4 +1,4 @@
/* $NetBSD: sdt.h,v 1.10 2018/08/26 16:54:38 riastradh Exp $ */
/* $NetBSD: sdt.h,v 1.11 2019/10/16 15:08:09 christos Exp $ */
/*-
* Copyright 2006-2008 John Birrell <jb@FreeBSD.org>
@ -309,11 +309,13 @@
SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0)
#define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \
SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
/* XXX: void * function casts */
#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) \
do { \
if (sdt_##prov##_##mod##_##func##_##name->id) \
(*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \
uintptr_t, uintptr_t, uintptr_t))sdt_probe_func)( \
uintptr_t, uintptr_t, uintptr_t))(void *) \
sdt_probe_func)( \
sdt_##prov##_##mod##_##func##_##name->id, \
(uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \
(uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5);\
@ -324,7 +326,7 @@
if (sdt_##prov##_##mod##_##func##_##name->id) \
(*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \
uintptr_t, uintptr_t, uintptr_t, uintptr_t)) \
sdt_probe_func)( \
(void *)sdt_probe_func)( \
sdt_##prov##_##mod##_##func##_##name->id, \
(uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \
(uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5, \