diff options
Diffstat (limited to 'src/platform/posix/posix_thread.c')
| -rw-r--r-- | src/platform/posix/posix_thread.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/platform/posix/posix_thread.c b/src/platform/posix/posix_thread.c index 071e6007..0ef4754c 100644 --- a/src/platform/posix/posix_thread.c +++ b/src/platform/posix/posix_thread.c @@ -1,5 +1,6 @@ // // Copyright 2017 Garrett D'Amore <garrett@damore.org> +// Copyright 2017 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -116,11 +117,13 @@ nni_plat_cv_init(nni_plat_cv *cv, nni_plat_mtx *mtx) void nni_plat_cv_wake(nni_plat_cv *cv) { - int rv; + (void) pthread_cond_broadcast(&cv->cv); +} - if ((rv = pthread_cond_broadcast(&cv->cv)) != 0) { - nni_panic("pthread_cond_broadcast: %s", strerror(rv)); - } +void +nni_plat_cv_wake1(nni_plat_cv *cv) +{ + (void) pthread_cond_signal(&cv->cv); } void |
