From 18b7cc99f467d541c8cbf9abb3ee85a41ef8f472 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 27 Feb 2013 01:43:15 +0100 Subject: hello-mt: fix pthread porting issue Properly use pthread_mutex_destroy as equivalent for cthreads' mutex_clear, instead of pthread_mutex_init. Issue kindly reported by Nick Lloyd, thanks! * trans/hello-mt.c (close_hook): Call pthread_mutex_destroy instead of pthread_mutex_init. --- trans/hello-mt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trans/hello-mt.c b/trans/hello-mt.c index 632d3730..c2d4cc99 100644 --- a/trans/hello-mt.c +++ b/trans/hello-mt.c @@ -111,7 +111,7 @@ close_hook (struct trivfs_peropen *peropen) { struct open *op = peropen->hook; - pthread_mutex_init (&op->lock, NULL); + pthread_mutex_destroy (&op->lock); free (op); } -- cgit v1.2.3