Ubuntu Feisty 7.04 manual page repository

Ubuntu is a free computer operating system based on the Linux kernel. Many IT companies, like DeployIS is using it to provide an up-to-date, stable operating system.

Provided by: freebsd-manpages_6.0-5_all



      new_unrhdr, delete_unrhdr, alloc_unr, free_unr - kernel unit number allo‐


      #include <sys/systm.h>
      struct unrhdr *
      new_unrhdr(int low, int high, struct mtx *mutex);
      delete_unrhdr(struct unrhdr *uh);
      alloc_unr(struct unrhdr *uh);
      alloc_unrl(struct unrhdr *uh);
      free_unr(struct unrhdr *uh, u_int item);


      The kernel unit number allocator is a generic facility, which allows to
      allocate unit numbers within a specified range.
      new_unrhdr(low, high, mutex)
              Initialize a new unit number allocator entity.  The low and high
              arguments specify minimum and maximum number of unit numbers.
              There is no cost associated with the range of unit numbers, so
              unless the resource really is finite, INT_MAX can be used.  If
              mutex is not NULL, it is used for locking when allocating and
              freeing units.  Otherwise, internal mutex is used.
              Destroy specified unit number allocator entity.
              Return a new unit number.  The lowest free number is always allo‐
              cated.  This function does not allocate memory and never sleeps,
              however it may block on a mutex.  If no free unit numbers are
              left, -1 is returned.
              Same as alloc_unr() except that mutex is assumed to be already
              locked and thus is not used.
              Free a previously allocated unit number.  This function may
              require allocating memory, and thus it can sleep.  There is no
              pre-locked variant.
      The above functions are implemented in sys/kern/subr_unit.c.


      Kernel unit number allocator first appeared in FreeBSD 5.5.


      Kernel unit number allocator was written by Poul-Henning Kamp.  This man‐
      page was written by Gleb Smirnoff.


What does Ubuntu mean?
Ubuntu is an African word meaning 'Humanity to others', or 'I am what I am because of who we all are'. The Ubuntu distribution brings the spirit of Ubuntu to the software world.