Lines Matching defs:clone

205 	struct apm_clone_data *clone;
207 clone = malloc(sizeof(*clone), M_APMDEV, M_WAITOK);
208 clone->cdev = dev;
209 clone->acpi_sc = acpi_sc;
210 clone->notify_status = APM_EV_NONE;
211 bzero(&clone->sel_read, sizeof(clone->sel_read));
212 knlist_init_mtx(&clone->sel_read.si_note, &acpi_mutex);
219 clone->flags = ACPI_EVF_DEVD | ACPI_EVF_WRITE;
221 clone->flags = ACPI_EVF_NONE;
224 STAILQ_INSERT_TAIL(&acpi_sc->apm_cdevs, clone, entries);
226 return (clone);
232 struct apm_clone_data *clone;
235 clone = data;
236 acpi_sc = clone->acpi_sc;
240 clone->notify_status != APM_EV_ACKED)
241 acpi_AckSleepState(clone, 0);
243 /* Remove this clone's data from the list and free it. */
245 STAILQ_REMOVE(&acpi_sc->apm_cdevs, clone, apm_clone_data, entries);
246 seldrain(&clone->sel_read);
247 knlist_destroy(&clone->sel_read.si_note);
249 free(clone, M_APMDEV);
256 struct apm_clone_data *clone;
259 clone = apm_create_clone(dev, acpi_sc);
260 devfs_set_cdevpriv(clone, apmdtor);
264 clone->flags |= ACPI_EVF_WRITE;
273 struct apm_clone_data *clone;
280 devfs_get_cdevpriv((void **)&clone);
281 acpi_sc = clone->acpi_sc;
297 error = acpi_AckSleepState(clone, 0);
312 error = acpi_AckSleepState(clone, 0);
317 if (acpi_sc->acpi_next_sstate != 0 && clone->notify_status ==
325 clone->notify_status = APM_EV_NOTIFIED;
390 struct apm_clone_data *clone;
394 devfs_get_cdevpriv((void **)&clone);
396 if (clone->acpi_sc->acpi_next_sstate)
399 selrecord(td, &clone->sel_read);
407 struct apm_clone_data *clone;
409 devfs_get_cdevpriv((void **)&clone);
411 kn->kn_hook = clone;
413 knlist_add(&clone->sel_read.si_note, kn, 0);
421 struct apm_clone_data *clone;
424 clone = kn->kn_hook;
425 knlist_remove(&clone->sel_read.si_note, kn, 0);
432 struct apm_clone_data *clone;
436 clone = kn->kn_hook;
437 sleeping = clone->acpi_sc->acpi_next_sstate ? 1 : 0;
446 /* Create a clone for /dev/acpi also. */