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

@ -25,6 +25,7 @@
#include "../box/tiny_c5_inline_slots_env_box.h"
#include "../box/tiny_c5_inline_slots_tls_box.h"
#include "../box/tiny_inline_slots_fixed_mode_box.h"
#include "../box/tiny_inline_slots_overflow_stats_box.h"
// ============================================================================
// Fast-Path API (always_inline for zero branch overhead)
@ -35,8 +36,11 @@
// Precondition: ptr is valid BASE pointer for C5 class
__attribute__((always_inline))
static inline int c5_inline_push(TinyC5InlineSlots* slots, void* ptr) {
tiny_inline_slots_count_push_total(5); // Phase 87: Telemetry (all attempts)
// Full check (single branch, likely taken in steady state)
if (__builtin_expect(c5_inline_full(slots), 0)) {
tiny_inline_slots_count_push_full(5); // Phase 87: Telemetry (overflow)
return 0; // Full, caller must fallback
}
@ -52,8 +56,11 @@ static inline int c5_inline_push(TinyC5InlineSlots* slots, void* ptr) {
// Precondition: slots is initialized and enabled
__attribute__((always_inline))
static inline void* c5_inline_pop(TinyC5InlineSlots* slots) {
tiny_inline_slots_count_pop_total(5); // Phase 87: Telemetry (all attempts)
// Empty check (single branch, likely NOT taken in steady state)
if (__builtin_expect(c5_inline_empty(slots), 0)) {
tiny_inline_slots_count_pop_empty(5); // Phase 87: Telemetry (underflow)
return NULL; // Empty, caller must fallback
}