NVMLib  very early alpha
A library to optimally use a Hybrid RAM setup.
object_maintainance.h File Reference
#include <uv.h>
#include "globals.h"
#include "malloc.h"
#include <time.h>
#include <sys/queue.h>
Include dependency graph for object_maintainance.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  object_maintainance_st
 The structure used by the logistics thread for keeping track of the object state in order to make different desicions regarding the placement of object in DRAM or NVRAM. More...
 
struct  object_maintainance_addition
 
struct  object_maintainance_deletion
 

Macros

#define DELETE_LOOP_SLEEP_TIME   1000
 The sleep time for deletion thread More...
 
#define MOVE_LOOP_SLEEP_TIME   1000
 The sleep time for logistics thread More...
 

Typedefs

typedef enum access_type_en access_types_t
 
typedef enum shitf_levels_en shift_levels_t
 
typedef enum where_en where_t
 
typedef struct object_maintainance_st object_maintainance
 The structure used by the logistics thread for keeping track of the object state in order to make different desicions regarding the placement of object in DRAM or NVRAM. More...
 
typedef struct object_maintainance_addition object_maintainance_addition
 
typedef struct object_maintainance_deletion object_maintainance_deletion
 

Enumerations

enum  access_type_en { ACCESS_UNKNOWN, READ, WRITE }
 
enum  shitf_levels_en {
  JUST_ENTERED, ONE, TWO, THREE,
  FOUR, MOVE_NOW
}
 
enum  where_en { RAM_UNKNOWN, DRAM, NVRAM, NO_RAM }
 

Functions

 TAILQ_HEAD (object_maintainance_addition_list, object_maintainance_addition) addition_queue_head
 
 TAILQ_HEAD (object_maintainance_deletion_list, object_maintainance_deletion) deletion_queue_head
 
void initialise_logistics ()
 
void lock_om ()
 
void unlock_om ()
 
object_maintainancefind_in_maintainance_map (MEMoidKey key)
 
void insert_into_maintainance_map (object_maintainance *obj)
 
void delete_from_maintainance_map (object_maintainance *obj)
 
object_maintainancecreate_new_maintainance_map_entry (MEMoidKey key, MEMoid oid, where_t which_ram, bool can_be_moved)
 

Macro Definition Documentation

◆ DELETE_LOOP_SLEEP_TIME

#define DELETE_LOOP_SLEEP_TIME   1000

The sleep time for deletion thread

Definition at line 12 of file object_maintainance.h.

◆ MOVE_LOOP_SLEEP_TIME

#define MOVE_LOOP_SLEEP_TIME   1000

The sleep time for logistics thread

Definition at line 14 of file object_maintainance.h.

Typedef Documentation

◆ access_types_t

◆ object_maintainance

The structure used by the logistics thread for keeping track of the object state in order to make different desicions regarding the placement of object in DRAM or NVRAM.

◆ object_maintainance_addition

◆ object_maintainance_deletion

◆ shift_levels_t

◆ where_t

typedef enum where_en where_t

Enumeration Type Documentation

◆ access_type_en

Enumerator
ACCESS_UNKNOWN 
READ 
WRITE 

Definition at line 15 of file object_maintainance.h.

◆ shitf_levels_en

Enumerator
JUST_ENTERED 
ONE 
TWO 
THREE 
FOUR 
MOVE_NOW 

Definition at line 21 of file object_maintainance.h.

◆ where_en

enum where_en
Enumerator
RAM_UNKNOWN 
DRAM 
NVRAM 
NO_RAM 

Definition at line 30 of file object_maintainance.h.

Function Documentation

◆ create_new_maintainance_map_entry()

object_maintainance* create_new_maintainance_map_entry ( MEMoidKey  key,
MEMoid  oid,
where_t  which_ram,
bool  can_be_moved 
)

Definition at line 570 of file object_maintainance.c.

◆ delete_from_maintainance_map()

void delete_from_maintainance_map ( object_maintainance obj)

Definition at line 598 of file object_maintainance.c.

◆ find_in_maintainance_map()

object_maintainance* find_in_maintainance_map ( MEMoidKey  key)

Definition at line 602 of file object_maintainance.c.

Here is the call graph for this function:

◆ initialise_logistics()

void initialise_logistics ( )

Definition at line 79 of file object_maintainance.c.

Here is the call graph for this function:

◆ insert_into_maintainance_map()

void insert_into_maintainance_map ( object_maintainance obj)

Definition at line 594 of file object_maintainance.c.

◆ lock_om()

void lock_om ( )

◆ TAILQ_HEAD() [1/2]

TAILQ_HEAD ( object_maintainance_addition_list  ,
object_maintainance_addition   
)

◆ TAILQ_HEAD() [2/2]

TAILQ_HEAD ( object_maintainance_deletion_list  ,
object_maintainance_deletion   
)

◆ unlock_om()

void unlock_om ( )

Definition at line 75 of file object_maintainance.c.