diff options
| -rw-r--r-- | src/platform/posix/posix_thread.c | 7 | ||||
| -rw-r--r-- | tests/platform.c | 8 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/platform/posix/posix_thread.c b/src/platform/posix/posix_thread.c index 0a999326..02f0b058 100644 --- a/src/platform/posix/posix_thread.c +++ b/src/platform/posix/posix_thread.c @@ -20,12 +20,6 @@ #include <sys/types.h> #include <unistd.h> -struct nni_thread { - pthread_t tid; - void * arg; - void (*func)(void *); -}; - static pthread_mutex_t nni_plat_lock = PTHREAD_MUTEX_INITIALIZER; static int nni_plat_inited = 0; static int nni_plat_forked = 0; @@ -45,6 +39,7 @@ nni_plat_nextid(void) return (id); } + int nni_plat_mtx_init(nni_plat_mtx *mtx) { diff --git a/tests/platform.c b/tests/platform.c index e252fa05..aa14ffeb 100644 --- a/tests/platform.c +++ b/tests/platform.c @@ -101,7 +101,7 @@ TestMain("Platform Operations", { }) }) Convey("Mutexes work", { - nni_mtx mx; + static nni_mtx mx; int rv; rv = nni_mtx_init(&mx); @@ -129,7 +129,7 @@ TestMain("Platform Operations", { }) Convey("Threads work", { - nni_thr thr; + static nni_thr thr; int val = 0; int rv; @@ -148,8 +148,8 @@ TestMain("Platform Operations", { }) }) Convey("Condition variables work", { - struct notifyarg arg; - nni_thr thr; + static struct notifyarg arg; + static nni_thr thr; So(nni_mtx_init(&arg.mx) == 0); So(nni_cv_init(&arg.cv, &arg.mx) == 0); |
