diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2013-02-27 01:43:15 +0100 |
---|---|---|
committer | Pino Toscano <toscano.pino@tiscali.it> | 2013-02-27 01:43:15 +0100 |
commit | 18b7cc99f467d541c8cbf9abb3ee85a41ef8f472 (patch) | |
tree | 9820ebf2c49a44d50a0ce6425354f56e7b48d91f /trans/hello-mt.c | |
parent | 92b12d376799c4514c207669a93665c98661b995 (diff) |
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.
Diffstat (limited to 'trans/hello-mt.c')
-rw-r--r-- | trans/hello-mt.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |