aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_thread.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-01 19:48:10 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-01 19:48:10 -0800
commit783470724ed22b315f2ecc4e3b1ac9d199d44ea2 (patch)
treed4883f305b1f2c6f57710cd8900f4b0932ae14c0 /src/platform/posix/posix_thread.c
parentbbed172a2b38f9227ca9e1c02a933df068e5eaf7 (diff)
downloadnng-783470724ed22b315f2ecc4e3b1ac9d199d44ea2.tar.gz
nng-783470724ed22b315f2ecc4e3b1ac9d199d44ea2.tar.bz2
nng-783470724ed22b315f2ecc4e3b1ac9d199d44ea2.zip
Final purge of old threading & synch stuff.
Diffstat (limited to 'src/platform/posix/posix_thread.c')
-rw-r--r--src/platform/posix/posix_thread.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/platform/posix/posix_thread.c b/src/platform/posix/posix_thread.c
index d1944879..0a999326 100644
--- a/src/platform/posix/posix_thread.c
+++ b/src/platform/posix/posix_thread.c
@@ -45,50 +45,6 @@ nni_plat_nextid(void)
return (id);
}
-
-static void *
-nni_thrfunc(void *arg)
-{
- nni_thread *thr = arg;
-
- thr->func(thr->arg);
- return (NULL);
-}
-
-
-int
-nni_thread_create(nni_thread **tp, void (*fn)(void *), void *arg)
-{
- nni_thread *thr;
- int rv;
-
- if ((thr = nni_alloc(sizeof (*thr))) == NULL) {
- return (NNG_ENOMEM);
- }
- thr->func = fn;
- thr->arg = arg;
-
- if ((rv = pthread_create(&thr->tid, NULL, nni_thrfunc, thr)) != 0) {
- nni_free(thr, sizeof (*thr));
- return (NNG_ENOMEM);
- }
- *tp = thr;
- return (0);
-}
-
-
-void
-nni_thread_reap(nni_thread *thr)
-{
- int rv;
-
- if ((rv = pthread_join(thr->tid, NULL)) != 0) {
- nni_panic("pthread_thread: %s", strerror(rv));
- }
- nni_free(thr, sizeof (*thr));
-}
-
-
int
nni_plat_mtx_init(nni_plat_mtx *mtx)
{