22 lines
636 B
C
22 lines
636 B
C
|
|
#pragma once
|
||
|
|
#include "slot.h"
|
||
|
|
|
||
|
|
/* Maximum number of concurrent slots */
|
||
|
|
#define FC_MAX_SLOTS 256
|
||
|
|
|
||
|
|
/* Registry entry (in-memory) */
|
||
|
|
typedef struct {
|
||
|
|
int active;
|
||
|
|
struct fc_slot *slot;
|
||
|
|
char slot_id[FC_MAX_SLOT_ID];
|
||
|
|
} fc_registry_entry_t;
|
||
|
|
|
||
|
|
/* Global registry — managed by framecache.c */
|
||
|
|
extern fc_registry_entry_t g_registry[FC_MAX_SLOTS];
|
||
|
|
extern int g_registry_count;
|
||
|
|
|
||
|
|
void registry_add(struct fc_slot *slot);
|
||
|
|
void registry_remove(const char *slot_id);
|
||
|
|
struct fc_slot *registry_find(const char *slot_id);
|
||
|
|
void registry_write_json(void); /* writes /dev/shm/framecache/registry.json */
|