From 513bf031a589d9e2a1a2730adf56f95e5e316a06 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 17:17:43 +0300 Subject: Remove unused private functions and inline trivial helpers --- src/internal.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/internal.h') diff --git a/src/internal.h b/src/internal.h index 477210d..d823018 100644 --- a/src/internal.h +++ b/src/internal.h @@ -382,15 +382,10 @@ static inline size_t term_copy_out(const char *text, char *buf, size_t cap) /* Every thread has its own anchor, so its address names the thread. */ extern _Thread_local char term_thread_anchor; -static inline uint64_t term_thread_id(void) -{ - return (uint64_t)(uintptr_t)&term_thread_anchor; -} - static inline void term_write_begin(struct term *t) { if (!t) return; - uint64_t self = term_thread_id(); + uint64_t self = (uint64_t)(uintptr_t)&term_thread_anchor; if (atomic_load_explicit(&t->writer_tid, memory_order_relaxed) == self) { t->write_depth++; return; -- cgit v1.2.3