mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-31 19:30:03 +00:00
extend file streaming cache to support range-based file stream queries; begin plugging in file stream queries as alternative to ctrl stream queries; further bugfixes & unification in eval system
This commit is contained in:
@@ -7,14 +7,34 @@
|
||||
////////////////////////////////
|
||||
//~ rjf: Per-Path Info Cache Types
|
||||
|
||||
typedef struct FS_RangeNode FS_RangeNode;
|
||||
struct FS_RangeNode
|
||||
{
|
||||
FS_RangeNode *next;
|
||||
Rng1U64 range;
|
||||
B32 is_working;
|
||||
};
|
||||
|
||||
typedef struct FS_RangeSlot FS_RangeSlot;
|
||||
struct FS_RangeSlot
|
||||
{
|
||||
FS_RangeNode *first;
|
||||
FS_RangeNode *last;
|
||||
};
|
||||
|
||||
typedef struct FS_Node FS_Node;
|
||||
struct FS_Node
|
||||
{
|
||||
FS_Node *next;
|
||||
|
||||
// rjf: file metadata
|
||||
String8 path;
|
||||
U64 timestamp;
|
||||
U64 size;
|
||||
B32 is_working;
|
||||
|
||||
// rjf: sub-table of per-requested-file-range info
|
||||
U64 slots_count;
|
||||
FS_RangeSlot *slots;
|
||||
};
|
||||
|
||||
typedef struct FS_Slot FS_Slot;
|
||||
@@ -68,6 +88,12 @@ struct FS_Shared
|
||||
|
||||
global FS_Shared *fs_shared = 0;
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Helpers
|
||||
|
||||
internal U64 fs_little_hash_from_string(String8 string);
|
||||
internal U128 fs_big_hash_from_string_range(String8 string, Rng1U64 range);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Top-Level API
|
||||
|
||||
@@ -81,16 +107,17 @@ internal U64 fs_change_gen(void);
|
||||
////////////////////////////////
|
||||
//~ rjf: Cache Interaction
|
||||
|
||||
internal U128 fs_hash_from_path(String8 path, U64 endt_us);
|
||||
internal U128 fs_key_from_path(String8 path);
|
||||
internal U128 fs_hash_from_path_range(String8 path, Rng1U64 range, U64 endt_us);
|
||||
internal U128 fs_key_from_path_range(String8 path, Rng1U64 range);
|
||||
|
||||
internal U64 fs_timestamp_from_path(String8 path);
|
||||
internal U64 fs_size_from_path(String8 path);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Streamer Threads
|
||||
|
||||
internal B32 fs_u2s_enqueue_path(String8 path, U64 endt_us);
|
||||
internal String8 fs_u2s_dequeue_path(Arena *arena);
|
||||
internal B32 fs_u2s_enqueue_req(Rng1U64 range, String8 path, U64 endt_us);
|
||||
internal void fs_u2s_dequeue_req(Arena *arena, Rng1U64 *range_out, String8 *path_out);
|
||||
|
||||
internal void fs_streamer_thread__entry_point(void *p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user