summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-14 17:17:43 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-14 17:17:43 +0300
commit513bf031a589d9e2a1a2730adf56f95e5e316a06 (patch)
tree66ef6b095e6aa00c790ac37705fb9df3b099b92a /src/internal.h
parent234dd752dc2e15afab38cbbf78f8aa32be72ea5f (diff)
Remove unused private functions and inline trivial helpers
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h7
1 files changed, 1 insertions, 6 deletions
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;