Lines Matching refs:id

23 #define TEST_TRANSACTION(id, num, mainNum, subNum) \
24 test_transaction(id, num, mainNum, subNum, __LINE__)
163 test_transaction(int32 id, int32 numBlocks, int32 numMainBlocks,
167 cache_transaction* transaction = lookup_transaction(gCache, id);
171 "%d)!", id, transaction->num_blocks, numBlocks);
175 "%d)!", id, transaction->main_num_blocks, numMainBlocks);
179 "%d)!", id, transaction->sub_num_blocks, numSubBlocks);
264 basic_test_discard_in_sub(int32 id, bool touchedInMain)
272 void* block = block_cache_get_writable(gCache, 1, id);
283 block = block_cache_get_empty(gCache, 2, id);
289 cache_start_sub_transaction(gCache, id);
304 block = block_cache_get_writable(gCache, 0, id);
332 int32 id = cache_start_transaction(gCache);
343 void* block = block_cache_get_empty(gCache, 0, id);
347 block = block_cache_get_writable(gCache, 1, id);
355 cache_end_transaction(gCache, id, NULL, NULL);
358 id = cache_start_transaction(gCache);
360 block = block_cache_get_writable(gCache, 0, id);
363 block = block_cache_get_writable(gCache, 1, id);
369 cache_abort_transaction(gCache, id);
375 cache_sync_transaction(gCache, id);
384 int32 id = cache_start_transaction(gCache);
395 void* block = block_cache_get_empty(gCache, 0, id);
399 block = block_cache_get_writable(gCache, 1, id);
407 cache_start_sub_transaction(gCache, id);
413 block = block_cache_get_writable(gCache, 1, id);
418 TEST_TRANSACTION(id, 2, 2, 1);
419 cache_abort_sub_transaction(gCache, id);
420 TEST_TRANSACTION(id, 2, 2, 0);
427 cache_end_transaction(gCache, id, NULL, NULL);
428 cache_sync_transaction(gCache, id);
431 id = cache_start_transaction(gCache);
436 block = block_cache_get_writable(gCache, 1, id);
446 TEST_TRANSACTION(id, 1, 0, 0);
447 cache_start_sub_transaction(gCache, id);
448 TEST_TRANSACTION(id, 1, 1, 0);
452 block = block_cache_get_empty(gCache, 0, id);
458 TEST_TRANSACTION(id, 2, 1, 1);
459 cache_abort_sub_transaction(gCache, id);
460 TEST_TRANSACTION(id, 1, 1, 0);
470 cache_end_transaction(gCache, id, NULL, NULL);
471 cache_sync_transaction(gCache, id);
482 int32 id = cache_start_transaction(gCache);
494 void* block = block_cache_get_writable(gCache, 1, id);
499 TEST_TRANSACTION(id, 1, 0, 0);
500 block = block_cache_get_empty(gCache, 2, id);
501 TEST_TRANSACTION(id, 2, 0, 0);
505 cache_end_transaction(gCache, id, NULL, NULL);
506 TEST_TRANSACTION(id, 1, 0, 0);
507 cache_sync_transaction(gCache, id);
511 id = cache_start_transaction(gCache);
513 basic_test_discard_in_sub(id, false);
514 TEST_ASSERT(cache_blocks_in_sub_transaction(gCache, id) == 1);
516 cache_end_transaction(gCache, id, NULL, NULL);
517 cache_sync_transaction(gCache, id);
524 id = cache_start_transaction(gCache);
526 basic_test_discard_in_sub(id, true);
528 cache_end_transaction(gCache, id, NULL, NULL);
529 cache_sync_transaction(gCache, id);
536 id = cache_start_transaction(gCache);
538 basic_test_discard_in_sub(id, true);
539 TEST_ASSERT(cache_blocks_in_sub_transaction(gCache, id) == 1);
550 cache_abort_sub_transaction(gCache, id);
557 cache_end_transaction(gCache, id, NULL, NULL);
558 cache_sync_transaction(gCache, id);
562 id = cache_start_transaction(gCache);
564 basic_test_discard_in_sub(id, true);
566 cache_start_sub_transaction(gCache, id);
567 cache_end_transaction(gCache, id, NULL, NULL);
568 cache_sync_transaction(gCache, id);
572 id = cache_start_transaction(gCache);
574 basic_test_discard_in_sub(id, true);
576 id = cache_detach_sub_transaction(gCache, id, NULL, NULL);
590 cache_end_transaction(gCache, id, NULL, NULL);
591 cache_sync_transaction(gCache, id);
595 id = cache_start_transaction(gCache);
603 block = block_cache_get_writable(gCache, 0, id);
607 basic_test_discard_in_sub(id, true);
609 id = cache_detach_sub_transaction(gCache, id, NULL, NULL);
624 cache_end_transaction(gCache, id, NULL, NULL);
625 cache_sync_transaction(gCache, id);