SHARE
TWEET

Untitled

a guest Oct 14th, 2011 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int
  2. acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg)
  3. {
  4.     struct acpi_ioctl_hook      *hp;
  5.  
  6.         printf("acpi_register_ioctl: allocating acpi_ioctl_hook\n");
  7.     if ((hp = malloc(sizeof(*hp), M_ACPIDEV, M_NOWAIT)) == NULL)
  8.         return (ENOMEM);
  9.     hp->cmd = cmd;
  10.     hp->fn = fn;
  11.     hp->arg = arg;
  12.  
  13.         printf("acpi_register_ioctl: ACPI_LOCK(acpi)\n");
  14.     ACPI_LOCK(acpi);
  15.     if (acpi_ioctl_hooks_initted == 0) {
  16.         printf("acpi_register_ioctl: TAILQ_INIT\n");
  17.         TAILQ_INIT(&acpi_ioctl_hooks);
  18.         acpi_ioctl_hooks_initted = 1;
  19.     }
  20.         printf("acpi_register_ioctl: TAILQ_INSERT_TAIL\n");
  21.     TAILQ_INSERT_TAIL(&acpi_ioctl_hooks, hp, link);
  22.         printf("acpi_register_ioctl: ACPI_UNLOCK(acpi)\n");
  23.     ACPI_UNLOCK(acpi);
  24.         printf("acpi_register_ioctl: finished\n");
  25.  
  26.     return (0);
  27. }
  28.  
  29.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top