mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
FreeBSD: Use a statement expression to implement SET_ERROR() (#16284)
This way we can avoid making assumptions about the SDT probe implementation. No functional change intended. Signed-off-by: Mark Johnston <markj@FreeBSD.org> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Allan Jude <allan@klarasystems.com> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
parent
fd51786f86
commit
f72e081fbf
@ -31,13 +31,14 @@
|
|||||||
|
|
||||||
#include_next <sys/sdt.h>
|
#include_next <sys/sdt.h>
|
||||||
#ifdef KDTRACE_HOOKS
|
#ifdef KDTRACE_HOOKS
|
||||||
/* CSTYLED */
|
/* BEGIN CSTYLED */
|
||||||
SDT_PROBE_DECLARE(sdt, , , set__error);
|
SDT_PROBE_DECLARE(sdt, , , set__error);
|
||||||
|
|
||||||
#define SET_ERROR(err) \
|
#define SET_ERROR(err) ({ \
|
||||||
((sdt_sdt___set__error->id ? \
|
SDT_PROBE1(sdt, , , set__error, (uintptr_t)err); \
|
||||||
(*sdt_probe_func)(sdt_sdt___set__error->id, \
|
err; \
|
||||||
(uintptr_t)err, 0, 0, 0, 0) : 0), err)
|
})
|
||||||
|
/* END CSTYLED */
|
||||||
#else
|
#else
|
||||||
#define SET_ERROR(err) (err)
|
#define SET_ERROR(err) (err)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user