-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdb_frame.h
More file actions
21 lines (15 loc) · 712 Bytes
/
db_frame.h
File metadata and controls
21 lines (15 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once
#define FrameSlots 125 // make sizeof(Frame) a multiple of 16
typedef struct {
DbAddr next; // next frame in queue
DbAddr prev; // prev frame in queue
uint64_t timestamp; // latest timestamp
uint64_t slots[FrameSlots]; // array of waiting/free slots
} Frame;
void returnFreeFrame(DbMap *map, DbAddr slot);
uint64_t getNodeFromFrame (DbMap *map, DbAddr *queue);
uint32_t initObjFrame (DbMap *map, DbAddr *queue, uint32_t type, uint32_t size);
bool addValuesToFrame(DbMap *map, DbAddr *queue, uint64_t *values, int count);
bool addSlotToFrame(DbMap *map, DbAddr *queue, uint64_t value);
bool initObjIdFrame(DbMap *map, DbAddr *free);
void returnFreeFrame(DbMap *map, DbAddr free);