aboutsummaryrefslogtreecommitdiff
path: root/src/core/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/thread.c')
-rw-r--r--src/core/thread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/thread.c b/src/core/thread.c
index 54c9c7d2..adc35542 100644
--- a/src/core/thread.c
+++ b/src/core/thread.c
@@ -173,3 +173,12 @@ nni_thr_fini(nni_thr *thr)
nni_plat_mtx_fini(&thr->mtx);
thr->init = 0;
}
+
+bool
+nni_thr_is_self(nni_thr *thr)
+{
+ if (!thr->init) {
+ return (false);
+ }
+ return (nni_plat_thr_is_self(&thr->thr));
+}