Fix gcc uninitialized warning in FreeBSD zio_crypt.c
[zfs.git] / lib / libspl / include / sys / trace_spl.h
blobb80d288f73327afc630b039f7d0f1d2e2bb7617d
1 /* Here to keep the libspl build happy */
3 #ifndef _LIBSPL_SPL_TRACE_H
4 #define _LIBSPL_SPL_TRACE_H
6 /*
7 * The set-error SDT probe is extra static, in that we declare its fake
8 * function literally, rather than with the DTRACE_PROBE1() macro. This is
9 * necessary so that SET_ERROR() can evaluate to a value, which wouldn't
10 * be possible if it required multiple statements (to declare the function
11 * and then call it).
13 * SET_ERROR() uses the comma operator so that it can be used without much
14 * additional code. For example, "return (EINVAL);" becomes
15 * "return (SET_ERROR(EINVAL));". Note that the argument will be evaluated
16 * twice, so it should not have side effects (e.g. something like:
17 * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice).
19 #undef SET_ERROR
20 #define SET_ERROR(err) \
21 (__set_error(__FILE__, __func__, __LINE__, err), err)
24 #endif