Mercurial > hg > GearsTemplate
view src/parallel_execution/verifier/verify_put_cs.c @ 284:e6bc0a4c2c36
generate C_start_code and C_exit_code
author | mir3636 |
---|---|
date | Sun, 05 Feb 2017 19:08:22 +0900 |
parents | src/llrb/verifier/verify_put_cs.c@3d7ecced7e14 |
children |
line wrap: on
line source
/* Verification of LLRB-Tree height in put operations. * LLRB-Tree allows (max-height) <= 2*(min-height). */ #include <stdlib.h> #include <stdio.h> #include <time.h> #include "llrbContextWithVerifier.h" __code meta(struct Context* context, enum Code next) { if (next == Put) { verify_tree_height(context->data[Tree]->tree.root); } goto (context->code[next])(context); } __code start_code(struct Context* context, enum Code next) { unsigned int seed = (unsigned int)time(NULL); printf("--- srand(%u)\n", seed); goto meta(context, next); } __code exit_code(struct Context* context) { free(context->code); free(context->data); free(context->heapStart); goto exit(0); }