The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/kernel-declare-event-class.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 dnl #
    2 dnl # Ensure the DECLARE_EVENT_CLASS macro is available to non-GPL modules.
    3 dnl #
    4 AC_DEFUN([ZFS_AC_KERNEL_DECLARE_EVENT_CLASS], [
    5         AC_MSG_CHECKING([whether DECLARE_EVENT_CLASS() is available])
    6         ZFS_LINUX_TRY_COMPILE_HEADER([
    7                 #include <linux/module.h>
    8                 MODULE_LICENSE("$ZFS_META_LICENSE");
    9 
   10                 #define CREATE_TRACE_POINTS
   11                 #include "conftest.h"
   12         ],[
   13                 trace_zfs_autoconf_event_one(1UL);
   14                 trace_zfs_autoconf_event_two(2UL);
   15         ],[
   16                 AC_MSG_RESULT(yes)
   17                 AC_DEFINE(HAVE_DECLARE_EVENT_CLASS, 1,
   18                     [DECLARE_EVENT_CLASS() is available])
   19         ],[
   20                 AC_MSG_RESULT(no)
   21         ],[
   22                 #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
   23                 #define _CONFTEST_H
   24 
   25                 #undef  TRACE_SYSTEM
   26                 #define TRACE_SYSTEM zfs
   27                 #include <linux/tracepoint.h>
   28 
   29                 DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
   30                         TP_PROTO(unsigned long i),
   31                         TP_ARGS(i),
   32                         TP_STRUCT__entry(
   33                                 __field(unsigned long, i)
   34                         ),
   35                         TP_fast_assign(
   36                                 __entry->i = i;
   37                         ),
   38                         TP_printk("i = %lu", __entry->i)
   39                 );
   40 
   41                 #define DEFINE_AUTOCONF_EVENT(name) \
   42                 DEFINE_EVENT(zfs_autoconf_event_class, name, \
   43                         TP_PROTO(unsigned long i), \
   44                         TP_ARGS(i))
   45                 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
   46                 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
   47 
   48                 #endif /* _CONFTEST_H */
   49 
   50                 #undef  TRACE_INCLUDE_PATH
   51                 #define TRACE_INCLUDE_PATH .
   52                 #define TRACE_INCLUDE_FILE conftest
   53                 #include <trace/define_trace.h>
   54         ])
   55 ])

Cache object: 57185b4256697c9c2d0b4543a44bfda2


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.