102 nulldev, /* identify */
103 nulldev, /* probe */
104 dpattach, /* attach */
105 dpdetach, /* detach */
106 nodev, /* reset */
107 &dp_cb_ops, /* driver operations */
108 (struct bus_ops *)NULL, /* bus operations */
109 nulldev, /* power */
110 ddi_quiesce_not_needed, /* quiesce */
111 };
112
113
114 static struct modldrv modldrv = {
115 &mod_driverops, /* type of module - a driver */
116 "/dev/poll driver",
117 &dp_ops,
118 };
119
120 static struct modlinkage modlinkage = {
121 MODREV_1,
122 (void *)&modldrv,
123 NULL
124 };
125
126 static void pcachelink_assoc(pollcache_t *, pollcache_t *);
127 static void pcachelink_mark_stale(pollcache_t *);
128 static void pcachelink_purge_stale(pollcache_t *);
129 static void pcachelink_purge_all(pollcache_t *);
130
131
132 /*
133 * Locking Design
134 *
135 * The /dev/poll driver shares most of its code with poll sys call whose
136 * code is in common/syscall/poll.c. In poll(2) design, the pollcache
137 * structure is per lwp. An implicit assumption is made there that some
138 * portion of pollcache will never be touched by other lwps. E.g., in
139 * poll(2) design, no lwp will ever need to grow bitmap of other lwp.
140 * This assumption is not true for /dev/poll; hence the need for extra
141 * locking.
142 *
143 * To allow more parallelism, each /dev/poll file descriptor (indexed by
|
102 nulldev, /* identify */
103 nulldev, /* probe */
104 dpattach, /* attach */
105 dpdetach, /* detach */
106 nodev, /* reset */
107 &dp_cb_ops, /* driver operations */
108 (struct bus_ops *)NULL, /* bus operations */
109 nulldev, /* power */
110 ddi_quiesce_not_needed, /* quiesce */
111 };
112
113
114 static struct modldrv modldrv = {
115 &mod_driverops, /* type of module - a driver */
116 "/dev/poll driver",
117 &dp_ops,
118 };
119
120 static struct modlinkage modlinkage = {
121 MODREV_1,
122 { (void *)&modldrv,
123 NULL }
124 };
125
126 static void pcachelink_assoc(pollcache_t *, pollcache_t *);
127 static void pcachelink_mark_stale(pollcache_t *);
128 static void pcachelink_purge_stale(pollcache_t *);
129 static void pcachelink_purge_all(pollcache_t *);
130
131
132 /*
133 * Locking Design
134 *
135 * The /dev/poll driver shares most of its code with poll sys call whose
136 * code is in common/syscall/poll.c. In poll(2) design, the pollcache
137 * structure is per lwp. An implicit assumption is made there that some
138 * portion of pollcache will never be touched by other lwps. E.g., in
139 * poll(2) design, no lwp will ever need to grow bitmap of other lwp.
140 * This assumption is not true for /dev/poll; hence the need for extra
141 * locking.
142 *
143 * To allow more parallelism, each /dev/poll file descriptor (indexed by
|