]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - zfs/include/sys/sdt.h
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
32 #define ZFS_PROBE(a) ((void) 0)
33 #define ZFS_PROBE1(a, c) ((void) 0)
34 #define ZFS_PROBE2(a, c, e) ((void) 0)
35 #define ZFS_PROBE3(a, c, e, g) ((void) 0)
36 #define ZFS_PROBE4(a, c, e, g, i) ((void) 0)
41 * The set-error SDT probe is extra static, in that we declare its fake
42 * function literally, rather than with the DTRACE_PROBE1() macro. This is
43 * necessary so that SET_ERROR() can evaluate to a value, which wouldn't
44 * be possible if it required multiple statements (to declare the function
47 * SET_ERROR() uses the comma operator so that it can be used without much
48 * additional code. For example, "return (EINVAL);" becomes
49 * "return (SET_ERROR(EINVAL));". Note that the argument will be evaluated
50 * twice, so it should not have side effects (e.g. something like:
51 * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice).
53 extern void __set_error(const char *file
, const char *func
, int line
, int err
);
55 #define SET_ERROR(err) \
56 (__set_error(__FILE__, __func__, __LINE__, err), err)
58 #endif /* _SYS_SDT_H */