Working state before pushing to cyu remote

This commit is contained in:
Moe Charm (CI)
2025-12-19 03:45:01 +09:00
parent e4c5f05355
commit 2013514f7b
28 changed files with 1968 additions and 43 deletions

View File

@ -26,6 +26,7 @@
#include "../box/tiny_c3_inline_slots_tls_box.h"
#include "../box/tiny_c3_inline_slots_env_box.h"
#include "../box/tiny_inline_slots_fixed_mode_box.h"
#include "../box/tiny_inline_slots_overflow_stats_box.h"
// ============================================================================
// C3 Inline Slots: Fast-Path Push/Pop (Always-Inline)
@ -42,8 +43,11 @@ static inline TinyC3InlineSlots* c3_inline_tls(void) {
// Returns: 1 if success, 0 if full (caller must fallback to unified_cache)
__attribute__((always_inline))
static inline int c3_inline_push(TinyC3InlineSlots* slots, void* ptr) {
tiny_inline_slots_count_push_total(3); // Phase 87: Telemetry (all attempts)
// Check if ring is full
if (__builtin_expect(c3_inline_full(slots), 0)) {
tiny_inline_slots_count_push_full(3); // Phase 87: Telemetry (overflow)
return 0; // Full, caller must use unified_cache
}
@ -58,8 +62,11 @@ static inline int c3_inline_push(TinyC3InlineSlots* slots, void* ptr) {
// Returns: non-NULL if success, NULL if empty (caller must fallback to unified_cache)
__attribute__((always_inline))
static inline void* c3_inline_pop(TinyC3InlineSlots* slots) {
tiny_inline_slots_count_pop_total(3); // Phase 87: Telemetry (all attempts)
// Check if ring is empty
if (__builtin_expect(c3_inline_empty(slots), 0)) {
tiny_inline_slots_count_pop_empty(3); // Phase 87: Telemetry (underflow)
return NULL; // Empty, caller must use unified_cache
}