Commit 564067a7 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#2949 fix lock tree test compilation problems refs[t:2949]

git-svn-id: file:///svn/toku/tokudb@39396 c7de825b-a66e-492c-adef-691d508d4ae1
parent ff4fb936
...@@ -24,10 +24,10 @@ struct my_ltm_status { ...@@ -24,10 +24,10 @@ struct my_ltm_status {
static void my_ltm_get_status(toku_ltm *ltm, struct my_ltm_status *my_status) { static void my_ltm_get_status(toku_ltm *ltm, struct my_ltm_status *my_status) {
LTM_STATUS_S status; LTM_STATUS_S status;
toku_ltm_get_status(ltm, &status); toku_ltm_get_status(ltm, &status);
my_status->max_locks = status.status[LTM_LOCKS_LIMIT].value; my_status->max_locks = status.status[LTM_LOCKS_LIMIT].value.num;
my_status->curr_locks = status.status[LTM_LOCKS_CURR].value; my_status->curr_locks = status.status[LTM_LOCKS_CURR].value.num;
my_status->max_lock_memory = status.status[LTM_LOCK_MEMORY_LIMIT].value; my_status->max_lock_memory = status.status[LTM_LOCK_MEMORY_LIMIT].value.num;
my_status->curr_lock_memory = status.status[LTM_LOCK_MEMORY_CURR].value; my_status->curr_lock_memory = status.status[LTM_LOCK_MEMORY_CURR].value.num;
} }
static void *my_malloc(size_t s) { static void *my_malloc(size_t s) {
......
...@@ -24,10 +24,10 @@ struct my_ltm_status { ...@@ -24,10 +24,10 @@ struct my_ltm_status {
static void my_ltm_get_status(toku_ltm *ltm, struct my_ltm_status *my_status) { static void my_ltm_get_status(toku_ltm *ltm, struct my_ltm_status *my_status) {
LTM_STATUS_S status; LTM_STATUS_S status;
toku_ltm_get_status(ltm, &status); toku_ltm_get_status(ltm, &status);
my_status->max_locks = status.status[LTM_LOCKS_LIMIT].value; my_status->max_locks = status.status[LTM_LOCKS_LIMIT].value.num;
my_status->curr_locks = status.status[LTM_LOCKS_CURR].value; my_status->curr_locks = status.status[LTM_LOCKS_CURR].value.num;
my_status->max_lock_memory = status.status[LTM_LOCK_MEMORY_LIMIT].value; my_status->max_lock_memory = status.status[LTM_LOCK_MEMORY_LIMIT].value.num;
my_status->curr_lock_memory = status.status[LTM_LOCK_MEMORY_CURR].value; my_status->curr_lock_memory = status.status[LTM_LOCK_MEMORY_CURR].value.num;
} }
static void *my_malloc(size_t s) { static void *my_malloc(size_t s) {
......
...@@ -7,10 +7,10 @@ enum { MAX_LOCKS = 1000, MAX_LOCK_MEMORY = MAX_LOCKS * 64 }; ...@@ -7,10 +7,10 @@ enum { MAX_LOCKS = 1000, MAX_LOCK_MEMORY = MAX_LOCKS * 64 };
static void do_ltm_status(toku_ltm *ltm) { static void do_ltm_status(toku_ltm *ltm) {
LTM_STATUS_S s; LTM_STATUS_S s;
toku_ltm_get_status(ltm, &s); toku_ltm_get_status(ltm, &s);
assert(s.status[LTM_LOCKS_LIMIT].value == MAX_LOCKS); assert(s.status[LTM_LOCKS_LIMIT].value.num == MAX_LOCKS);
assert(s.status[LTM_LOCKS_CURR].value == 0); assert(s.status[LTM_LOCKS_CURR].value.num == 0);
assert(s.status[LTM_LOCK_MEMORY_LIMIT].value == MAX_LOCK_MEMORY); assert(s.status[LTM_LOCK_MEMORY_LIMIT].value.num == MAX_LOCK_MEMORY);
assert(s.status[LTM_LOCK_MEMORY_CURR].value == 0); assert(s.status[LTM_LOCK_MEMORY_CURR].value.num == 0);
} }
int main(int argc, const char *argv[]) { int main(int argc, const char *argv[]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment