~vkolesnikov/pbxt/pbxt-preload-test-bug

« back to all changes in this revision

Viewing changes to src/tabcache_xt.cc

  • Committer: Vladimir Kolesnikov
  • Date: 2009-01-21 13:55:57 UTC
  • mto: This revision was merged to the branch mainline in revision 533.
  • Revision ID: vladimir@primebase.org-20090121135557-gyzk4wo3kj126jda
added thread lock lists

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include <signal.h>
30
30
 
 
31
#include "pthread_xt.h"
31
32
#include "tabcache_xt.h"
32
33
#include "table_xt.h"
33
34
#include "database_xt.h"
62
63
                for (u_int i=0; i<XT_TC_SEGMENT_COUNT; i++) {
63
64
                        xt_tab_cache.tcm_segment[i].tcs_cache_in_use = 0;
64
65
                        xt_tab_cache.tcm_segment[i].tcs_hash_table = (XTTabCachePagePtr *) xt_calloc(self, xt_tab_cache.tcm_hash_size * sizeof(XTTabCachePagePtr));
65
 
                        xt_rwmutex_init(self, &xt_tab_cache.tcm_segment[i].tcs_lock);
 
66
                        xt_rwmutex_init_with_autoname(self, &xt_tab_cache.tcm_segment[i].tcs_lock);
66
67
                }
67
68
 
68
 
                xt_init_mutex(self, &xt_tab_cache.tcm_lock);
 
69
                xt_init_mutex_with_autoname(self, &xt_tab_cache.tcm_lock);
69
70
                xt_init_cond(self, &xt_tab_cache.tcm_cond);
70
 
                xt_init_mutex(self, &xt_tab_cache.tcm_freeer_lock);
 
71
                xt_init_mutex_with_autoname(self, &xt_tab_cache.tcm_freeer_lock);
71
72
                xt_init_cond(self, &xt_tab_cache.tcm_freeer_cond);
72
73
        }
73
74
        catch_(a) {