Print this page
code review from Josh and Robert
   1 VMEM_ADD(9F)             Kernel Functions for Drivers             VMEM_ADD(9F)
   2 
   3 NAME
   4      vmem_add - add spans to a vmem arena
   5 
   6 SYNOPSIS
   7      #include <sys/vmem.h>
   8 
   9      void *
  10      vmem_add(vmem_t *vmp, void *vaddr, size_t size, int vmflag);
  11 
  12 INTERFACE LEVEL
  13      illumos DDI specific
  14 
  15 PARAMETERS
  16      vmp     The vmem arena to which the span should be added.
  17 
  18      vaddr   The base address of the span to add.
  19 
  20      size    The size of the span to add
  21 
  22      vmflag  Flags affecting the allocation of the span to add.
  23 
  24 DESCRIPTION
  25      The vmem_add() function adds size bytes starting at vaddr to a vmem arena
  26      from which future calls to vmem_alloc() may allocate.
  27 
  28      VM_SLEEP or VM_NOSLEEP must be specified, and indicate whether the
  29      addition may block.
  30 
  31 CONTEXT
  32      This function can be called from either user or kernel context.  If the
  33      VM_NOSLEEP flag is specified, it may also be called from interrupt
  34      context.
  35 
  36 RETURN VALUES
  37      Upon success vmem_add() returns vaddr.  On failure, NULL is returned.
  38 
  39 SEE ALSO
  40      vmem(9), vmem_alloc(9F), vmem_create(9F)
  41 
  42 illumos                        January 18, 2017                        illumos
   1 VMEM_ADD(9F)             Kernel Functions for Drivers             VMEM_ADD(9F)
   2 
   3 NAME
   4      vmem_add - add spans to a vmem arena
   5 
   6 SYNOPSIS
   7      #include <sys/vmem.h>
   8 
   9      void *
  10      vmem_add(vmem_t *vmp, void *vaddr, size_t size, int vmflag);
  11 
  12 INTERFACE LEVEL
  13      illumos DDI specific
  14 
  15 PARAMETERS
  16      vmp     The vmem arena to which the span should be added.
  17 
  18      vaddr   The base address of the span to add.
  19 
  20      size    The size of the span to add.
  21 
  22      vmflag  Flags affecting the allocation of the span to add.
  23 
  24 DESCRIPTION
  25      The vmem_add() function adds size bytes starting at vaddr to a vmem arena
  26      from which future calls to vmem_alloc() may allocate.
  27 
  28      VM_SLEEP or VM_NOSLEEP must be specified in vmflag, and indicate whether
  29      the addition may block.
  30 
  31 CONTEXT
  32      This function can be called from either user or kernel context.  If the
  33      VM_NOSLEEP flag is specified, it may also be called from interrupt
  34      context.
  35 
  36 RETURN VALUES
  37      Upon success vmem_add() returns vaddr.  On failure, NULL is returned.
  38 
  39 SEE ALSO
  40      vmem(9), vmem_alloc(9F), vmem_create(9F)
  41 
  42 illumos                        January 18, 2017                        illumos