]> code.citadel.org Git - citadel.git/commitdiff
* begin_critical_section() -- bypass transaction checking for S_FLOORCACHE
authorArt Cancro <ajc@citadel.org>
Mon, 29 Mar 2004 16:05:02 +0000 (16:05 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 29 Mar 2004 16:05:02 +0000 (16:05 +0000)
  sections, to avoid crashing the db layer

citadel/ChangeLog
citadel/sysdep.c

index 0a096422a52b451a386476efec7d8841b6ec3d8e..b3caa6ca5d38f325c60bf4259c671f1afdae4f98 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 620.3  2004/03/29 16:05:02  ajc
+ * begin_critical_section() -- bypass transaction checking for S_FLOORCACHE
+   sections, to avoid crashing the db layer
+
  Revision 620.2  2004/03/29 02:33:19  error
  * citadel.spec: major modifications for 6.xx (hasn't been updated since 5.xx)
 
@@ -5642,4 +5646,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index eb3c7bcec689a7c10627569a2e6b40ba2a3530bd..aea5614cdcb4eadf0335a52954873f6b016b0f35 100644 (file)
@@ -250,16 +250,17 @@ void begin_critical_section(int which_one)
 {
        /* lprintf(CTDL_DEBUG, "begin_critical_section(%d)\n", which_one); */
 
-
-       /* ensure nobody ever tries to do a critical section within a
-               transaction; this could lead to deadlock. */
+       /* For all types of critical sections except those listed here,
+        * ensure nobody ever tries to do a critical section within a
+        * transaction; this could lead to deadlock.
+        */
+       if (    (which_one != S_FLOORCACHE)
 #ifdef DEBUG_MEMORY_LEAKS
-       if (which_one != S_DEBUGMEMLEAKS) {
+               && (which_one != S_DEBUGMEMLEAKS)
 #endif
+       ) {
                cdb_check_handles();
-#ifdef DEBUG_MEMORY_LEAKS
        }
-#endif
        pthread_mutex_lock(&Critters[which_one]);
 }
 
@@ -268,7 +269,6 @@ void begin_critical_section(int which_one)
  */
 void end_critical_section(int which_one)
 {
-       /* lprintf(CTDL_DEBUG, "end_critical_section(%d)\n", which_one); */
        pthread_mutex_unlock(&Critters[which_one]);
 }