Turnstone Operating System
Loading...
Searching...
No Matches
tosdb_backend_memory.64.c File Reference

tosdb memory backend implementation More...

#include <tosdb/tosdb.h>
#include <tosdb/tosdb_internal.h>
#include <tosdb/tosdb_backend.h>
#include <future.h>
#include <buffer.h>
#include <cpu/sync.h>
#include <logging.h>
#include <strings.h>
#include <xxhash.h>

Classes

struct  tosdb_backend_memory_ctx_t
 

Typedefs

typedef struct tosdb_backend_memory_ctx_t tosdb_backend_memory_ctx_t
 

Functions

 MODULE ("turnstone.kernel.db")
 
uint8_ttosdb_backend_memory_read (tosdb_backend_t *backend, uint64_t position, uint64_t size)
 
uint64_t tosdb_backend_memory_write (tosdb_backend_t *backend, uint64_t position, uint64_t size, uint8_t *data)
 
boolean_t tosdb_backend_memory_flush (tosdb_backend_t *backend)
 
tosdb_backend_ttosdb_backend_memory_new (uint64_t capacity)
 creates new tosdb memory backend More...
 
tosdb_backend_ttosdb_backend_memory_from_buffer (buffer_t *buffer)
 creates new tosdb memory backend from buffer More...
 
uint8_ttosdb_backend_memory_get_contents (tosdb_backend_t *backend)
 get memory backend contents More...
 
boolean_t tosdb_backend_memory_close (tosdb_backend_t *backend)
 

Detailed Description

tosdb memory backend implementation

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ tosdb_backend_memory_from_buffer()

tosdb_backend_t * tosdb_backend_memory_from_buffer ( buffer_t buffer)

creates new tosdb memory backend from buffer

Parameters
[in]buffermemory backend buffer
Returns
memory backend

◆ tosdb_backend_memory_get_contents()

uint8_t * tosdb_backend_memory_get_contents ( tosdb_backend_t backend)

get memory backend contents

Parameters
[in]backendmemory backend
Returns
byte array of conntent

◆ tosdb_backend_memory_new()

tosdb_backend_t * tosdb_backend_memory_new ( uint64_t  capacity)

creates new tosdb memory backend

Parameters
[in]capacitymemory backend max capacity
Returns
memory backend