wiki:ProvidersInterface

Version 1 (modified by moo, 7 years ago) (diff)

--

Providers Interface

This page describe the XCache 2.0 WIP providers interface. Providers interface include shared memory, memory manager and lock.

Common Provider Interface

  • attach
  • detach
  • init
  • destroy

Shared Memory Provider Interface

  • support_readonly_protection (classmember)
  • support_scope(AccessScope scope) (classmember)
  • init(..., AccessScope scope, bool readonly_protection)
  • is_readonly
  • is_readwrite
  • to_readonly
  • to_readwrite

Memory Manager Provider Interface

  • malloc
  • calloc
  • free
  • avail
  • size
  • freeblock_first
  • freeblock_next
  • block_size
  • block_offset

Lock Provider Interface

  • support_scope(AccessScope scope) (classmember)
  • init(..., access_scope_t scope)
  • lock(LOCK_SH | LOCK_EX | LOCK_NONBLOCK)
  • unlock