diff options
Diffstat (limited to 'src/platform/posix/posix_thread.c')
| -rw-r--r-- | src/platform/posix/posix_thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform/posix/posix_thread.c b/src/platform/posix/posix_thread.c index cca8165c..0a521513 100644 --- a/src/platform/posix/posix_thread.c +++ b/src/platform/posix/posix_thread.c @@ -422,6 +422,12 @@ nni_plat_thr_fini(nni_plat_thr *thr) } } +bool +nni_plat_thr_is_self(nni_plat_thr *thr) +{ + return (pthread_self() == thr->tid); +} + void nni_atfork_child(void) { |
