logo       

cvs: pecl /apc apc_sma.c: msg#00249

php.pecl.cvs

Subject: cvs: pecl /apc apc_sma.c

iliaa Thu Jul 28 18:50:48 2005 EDT

Modified files:
/pecl/apc apc_sma.c
Log:
assert() first, lock 2nd, we don't want any deadlocks here.


http://cvs.php.net/diff.php/pecl/apc/apc_sma.c?r1=1.25&r2=1.26&ty=u
Index: pecl/apc/apc_sma.c
diff -u pecl/apc/apc_sma.c:1.25 pecl/apc/apc_sma.c:1.26
--- pecl/apc/apc_sma.c:1.25 Thu Jun 23 05:10:36 2005
+++ pecl/apc/apc_sma.c Thu Jul 28 18:50:46 2005
@@ -26,7 +26,7 @@

*/

-/* $Id: apc_sma.c,v 1.25 2005/06/23 09:10:36 rasmus Exp $ */
+/* $Id: apc_sma.c,v 1.26 2005/07/28 22:50:46 iliaa Exp $ */

#include "apc_sma.h"
#include "apc.h"
@@ -373,8 +373,8 @@
return;
}

+ assert(sma_initialized);
LOCK(sma_lock);
- assert(sma_initialized);

for (i = 0; i < sma_numseg; i++) {
unsigned int d_size = (unsigned int)((char *)p - (char
*)(sma_shmaddrs[i]));



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise