Changeset 130
- Timestamp:
- 2006-09-03T09:36:09+02:00 (7 years ago)
- File:
-
- 1 edited
-
trunk/xcache.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r129 r130 43 43 #define LOCK(x) xc_lock(x->lck) 44 44 #define UNLOCK(x) xc_unlock(x->lck) 45 #define ENTER_LOCK(x) do { \ 46 int catched = 0;\45 46 #define ENTER_LOCK_EX(x) \ 47 47 xc_lock(x->lck); \ 48 48 zend_try { \ 49 49 do 50 #define LEAVE_LOCK (x) \50 #define LEAVE_LOCK_EX(x) \ 51 51 while (0); \ 52 52 } zend_catch { \ 53 53 catched = 1; \ 54 54 } zend_end_try(); \ 55 xc_unlock(x->lck); \ 55 xc_unlock(x->lck) 56 57 #define ENTER_LOCK(x) do { \ 58 int catched = 0; \ 59 ENTER_LOCK_EX(x) 60 #define LEAVE_LOCK(x) \ 61 LEAVE_LOCK_EX(x); \ 62 if (catched) { \ 63 zend_bailout(); \ 64 } \ 56 65 } while(0) 66 57 67 /* }}} */ 58 68 … … 763 773 stored_xce = NULL; 764 774 op_array = NULL; 765 ENTER_LOCK (cache) {775 ENTER_LOCK_EX(cache) { 766 776 /* clogged */ 767 777 if (cache->compiling) { … … 785 795 cache->compiling = XG(request_time); 786 796 cache->misses ++; 787 } LEAVE_LOCK(cache); 797 } LEAVE_LOCK_EX(cache); 798 799 if (catched) { 800 cache->compiling = 0; 801 zend_bailout(); 802 } 788 803 789 804 /* found */ … … 899 914 } 900 915 /* }}} */ 901 ENTER_LOCK (cache) { /* {{{ store/add entry */916 ENTER_LOCK_EX(cache) { /* {{{ store/add entry */ 902 917 stored_xce = xc_entry_store_dmz(&xce TSRMLS_CC); 903 } LEAVE_LOCK (cache);918 } LEAVE_LOCK_EX(cache); 904 919 /* }}} */ 905 920 #ifdef DEBUG
Note: See TracChangeset
for help on using the changeset viewer.

