io_space()

int io_space ( resmgr_context_t *ctp,
               io_space_t *msg,
               RESMGR_OCB_T *ocb ) 

Classification: I/O

Default handler: none

Helper functions: iofunc_space_verify()

Client functions: fcntl(), ftruncate(), ltrunc()

Messages: _IO_SPACE

Data structure:

struct _io_space {
  uint16_t         type;
  uint16_t         combine_len;
  uint16_t         subtype;
  short            whence;
  uint64_t         start;
  uint64_t         len;
};

typedef union {
  struct _io_space i;
  uint64_t         o;
} io_space_t;

Description: This is used to allocate or free space occupied by the resource. The subtype parameter indicates whether to allocate (if set to F_ALLOCSP) or deallocate (if set to F_FREESP) storage space. The combination of whence and start give the location where the beginning of the allocation or deallocation should occur; the member len indicates the size of the operation.

Returns: The number of bytes (size of the resource) via the helper macro _RESMGR_STATUS().