22 lines
724 B
C
22 lines
724 B
C
|
|
#pragma once
|
||
|
|
// RemoteSideBox: tiny_remote の REM_SIDE をプロファイルで論理的に絞るための薄いラッパ
|
||
|
|
|
||
|
|
#include <stdint.h>
|
||
|
|
#include <stdatomic.h>
|
||
|
|
|
||
|
|
typedef struct rem_side_entry {
|
||
|
|
_Atomic(uintptr_t) key; // node pointer
|
||
|
|
_Atomic(uintptr_t) val; // next pointer
|
||
|
|
} rem_side_entry;
|
||
|
|
|
||
|
|
typedef struct RemoteSideBox RemoteSideBox;
|
||
|
|
|
||
|
|
// profile が NULL のときは HAKMEM_PROFILE を見る。
|
||
|
|
void remote_side_init(RemoteSideBox* box, const char* profile);
|
||
|
|
|
||
|
|
// 有効サイズ/マスク(配列自体は REM_SIDE_SIZE のまま)
|
||
|
|
uint32_t remote_side_effective_size(void);
|
||
|
|
uint32_t remote_side_effective_mask(void);
|
||
|
|
uint32_t remote_side_effective_log2(void);
|
||
|
|
rem_side_entry* remote_side_table(void);
|