1ddi_get_eventcookie(9F) Kernel Functions for Drivers ddi_get_eventcookie(9F)
2
3
4
6 ddi_get_eventcookie - retrieve a NDI event service cookie handle
7
9 #include <sys/dditypes.h>
10 #include <sys/sunddi.h>
11
12 int ddi_get_eventcookie(dev_info_t *dip, char *name,
13 ddi_eventcookie_t *event_cookiep);
14
15
17 Solaris DDI specific (Solaris DDI).
18
20 dev_info_t *dip
21
22 Child device node requesting the cookie.
23
24
25 char *name
26
27 NULL-terminated string containing the name of the event.
28
29
30 ddi_eventcookie_t *event_cookiep
31
32 Pointer to cookie where event cookie will be returned.
33
34
36 The ddi_get_eventcookie() function queries the device tree for a cookie
37 matching the given event name and returns a reference to that cookie.
38 The search is performed by a calling up the device tree hierarchy until
39 the request is satisfied by a bus nexus driver, or the top of the
40 dev_info tree is reached.
41
42
43 The cookie returned by this function can be used to register a callback
44 handler, unregister a callback handler, or post an event.
45
47 DDI_SUCCESS Cookie handle is returned.
48
49
50 DDI_FAILURE Request was not serviceable by any nexus driver in the
51 driver's ancestral device tree hierarchy.
52
53
55 The ddi_get_eventcookie() function can be called from user and kernel
56 contexts only.
57
59 See attributes(5) for a description of the following attributes:
60
61
62
63
64 ┌─────────────────────────────┬─────────────────────────────┐
65 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
66 ├─────────────────────────────┼─────────────────────────────┤
67 │Interface Stability │Committed │
68 └─────────────────────────────┴─────────────────────────────┘
69
71 attributes(5), ddi_add_event_handler(9F), ddi_remove_event_handler(9F)
72
73
74 Writing Device Drivers
75
76
77
78SunOS 5.11 6 Nov 2003 ddi_get_eventcookie(9F)