|
From: | Neal H. Walfield |
Subject: | Re: [PATCH] libports: fix the thread counts in case the thread creation fails |
Date: | Sun, 10 Nov 2013 11:38:04 +0100 |
User-agent: | Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Sat, 9 Nov 2013 18:21:51 +0100, Samuel Thibault wrote: > > + pthread_spin_lock (&lock); > > + totalthreads--; > > + nreqthreads--; > > + pthread_spin_unlock (&lock); It might be a good idea use atomic operations instead of the spin lock (which is what the spin lock is using behind the scenes anyways). Neal
[Prev in Thread] | Current Thread | [Next in Thread] |