aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_threads.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-12-04 11:00:22 +0100
committerLukas Larsson <[email protected]>2014-12-19 10:39:51 +0100
commitf03bce6a77ff5c7885a3b200fe879210299194bb (patch)
treeb21678eeee5a033a708792e3c657f76c45f09086 /erts/emulator/beam/erl_threads.h
parent3aa7023f2e4f5454faddd663f00ee4c935f9b8f6 (diff)
downloadotp-f03bce6a77ff5c7885a3b200fe879210299194bb.tar.gz
otp-f03bce6a77ff5c7885a3b200fe879210299194bb.tar.bz2
otp-f03bce6a77ff5c7885a3b200fe879210299194bb.zip
erts: Add support for thread names
Diffstat (limited to 'erts/emulator/beam/erl_threads.h')
-rw-r--r--erts/emulator/beam/erl_threads.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_threads.h b/erts/emulator/beam/erl_threads.h
index 80026104db..1ab5418741 100644
--- a/erts/emulator/beam/erl_threads.h
+++ b/erts/emulator/beam/erl_threads.h
@@ -463,6 +463,7 @@ ERTS_GLB_INLINE void erts_thr_detach(erts_tid_t tid);
ERTS_GLB_INLINE void erts_thr_exit(void *res);
ERTS_GLB_INLINE void erts_thr_install_exit_handler(void (*exit_handler)(void));
ERTS_GLB_INLINE erts_tid_t erts_thr_self(void);
+ERTS_GLB_INLINE int erts_thr_getname(erts_tid_t tid, char *buf, size_t len);
ERTS_GLB_INLINE int erts_equal_tids(erts_tid_t x, erts_tid_t y);
ERTS_GLB_INLINE void erts_mtx_init_x(erts_mtx_t *mtx, char *name, Eterm extra,
int enable_lcnt);
@@ -1548,6 +1549,16 @@ erts_thr_self(void)
#endif
}
+ERTS_GLB_INLINE int
+erts_thr_getname(erts_tid_t tid, char *buf, size_t len)
+{
+#ifdef USE_THREADS
+ return ethr_getname(tid, buf, len);
+#else
+ return -1;
+#endif
+}
+
ERTS_GLB_INLINE int
erts_equal_tids(erts_tid_t x, erts_tid_t y)