summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
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;