svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
EVENTHANDLER(9)
The mechanism provides a way for kernel subsystems to register
interest in kernel events and have their callback functions in‐
voked when these events occur. Callback functions are invoked in
order of priority. The relative priority of each callback among
other callbacks associated with an event is given by argument
which is an integer ranging from (highest priority), to (lowest
priority). The symbol may be used if the handler does not have a
specific priority associated with it. The normal way to use this
subsystem is via the macro interface. For events that are high
frequency it is suggested that you additionally use so that the
event handlers can be invoked directly using (see below). This
saves the invoker from having to do a locked traversal of a
global list of event handler lists. This macro declares an event
handler named by argument with callback functions of type This
macro uses to register a callback function with event handler
When invoked, function will be invoked with argument as its first
parameter along with any additional parameters passed in via
macro (see below). This macro registers a callback function with
event handler When invoked, function will be invoked with argu‐
ment as its first parameter along with any additional parameters
passed in via macro (see below). If registration is successful,
returns a cookie of type This macro removes a previously regis‐
tered callback associated with tag from the event handler named
by argument It waits until no threads are running handlers for
this event before returning, making it safe to unload a module
immediately upon return from this function. This macro removes a
previously registered callback associated with tag from the event
handler named by argument Upon return, one or more threads could
still be running the removed function(s), but no new calls will
be made. To remove a handler function from within that function,
use this version of deregister, to avoid a deadlock. This macro
is used to invoke all the callbacks associated with event handler
This macro is a variadic one. Additional arguments to the macro
after the parameter are passed as the second and subsequent argu‐
ments to each registered callback function. This macro defines a
reference to an event handler list named by argument It uses to
initialize the reference and the eventhandler list. This macro
declares an event handler list named by argument This is only
needed for users of which are not in the same compilation unit of
that list's definition. This macro invokes the event handlers
registered for the list named by argument This macro can only be
used if the list was defined with The macro is variadic with the
same semantics as The macros are implemented using the following
functions: The function is used to register a callback with a
given event. The arguments expected by this function are: A
pointer to an existing event handler list, or If is the event
handler list corresponding to argument is used. The name of the
event handler list. A pointer to a callback function. Argument
is passed to the callback function as its first argument when it
is invoked. The relative priority of this callback among all the
callbacks registered for this event. Valid values are those in
the range to The function returns a that can later be used with
to remove the particular callback function. The function removes
the callback associated with tag from the event handler list
pointed to by If is all callback functions for the event are re‐
moved. This function will not return until all threads have ex‐
ited from the removed handler callback function(s). This func‐
tion is not safe to call from inside an event handler callback.
The function removes the callback associated with tag from the
event handler list pointed to by This function is safe to call
from inside an event handler callback. The function returns a
pointer to event handler list structure corresponding to event
The function removes all deregistered callbacks from the event
list The following event handlers are present in the kernel:
Callbacks invoked when the system is being sent to sleep. Call‐
backs invoked when the system is being woken up. Callbacks in‐
voked at start of application core dump. Callbacks invoked dur‐
ing progress of application core dump. Callbacks invoked at fin‐
ish of application core dump. Callbacks invoked on error of ap‐
plication core dump. Callbacks invoked when a BPF listener at‐
taches to/detaches from network interface. Callback invoked when
cpu frequency levels have changed. Callback invoked after cpu
frequency has changed. Callback invoked before cpu frequency has
changed. Callback invoked to poll for dcons changes. Callback
invoked after a device has attached. Callbacks invoked before
and after a device has detached. Callbacks invoked when a new
entry is created under Callback invoked when an interfance has
been added to an interface group. Callback invoked when an
change has been made to an interface group. Callback invoked
when an interfance has been removed from an interface group.
Callbacks invoked when an address is set up on a network inter‐
face. Callbacks invoked when an interface is cloned. Callback
invoked when an if link layer address event has happened. Call‐
backs invoked when a new network interface appears. Callbacks
invoked when a network interface is taken down. Callback invoked
when an interfance link event has happened. Callbacks invoked
after a linker file has been loaded. Callbacks invoked after a
linker file has been successfully unloaded. Callbacks invoked
before a linker file is about to be unloaded. These callbacks
may be used to return an error and prevent the unload from pro‐
ceeding. Callback invoked when an link layer event has happened.
Callback invoked when the number of mbuf clusters has changed.
Callback invoked when the number of mbufs has changed. Callback
invoked when the maximum number of sockets has changed. Callback
invoked when root has been mounted. Callbacks invoked when the
power profile of the system changes. Callback invoked when the
system has resumed. Callback invoked just before the system is
suspended. Callback invoked when a process is created. Callback
invoked when a process is destroyed. Callbacks invoked when a
process performs an operation. Callbacks invoked when a process
exits. Callback invoked when a process memory is destroyed.
This is never called. Callbacks invoked when a process forks a
child. Callback invoked when a process is initialized. Callback
invoked when a new random module has been loaded. Callback in‐
voked when a new frame buffer is registered. Callback invoked
when a route gets redirected to a new location. Callbacks in‐
voked at shutdown time, before file systems are synchronized.
Callbacks invoked at shutdown time, after all file systems are
synchronized. Callbacks invoked just before halting the system.
Callback invoked for TCP Offload to start listening for new con‐
nections. Callback invoked ror TCP Offload to stop listening for
new connections. Callback invoked when a thread object is cre‐
ated. Callback invoked when a thread object is destroyed. Call‐
back invoked when a thread object is initialized. Callback in‐
voked when a thread object is deinitalized. Callback invoked
when a USB device is configured Callback invoked when a frame
buffer is deregistered. Callback invoked when a file system is
mounted. Callback invoked when a file system is unmounted.
Callback invoked when the vlan configuration has changed. Call‐
back invoked when a vlan is destroyed. Callbacks invoked when
virtual memory is low. Callbacks invoked when the system watch‐
dog timer is reinitialized. The macro and function return a
cookie of type which may be used in a subsequent call to or The
function returns a pointer to an event handler list corresponding
to parameter or if no such list was found. The facility first
appeared in This manual page was written by and