composite_t *arena_update_composite(arena_t *m, occ_t f, uint32_t n, occ_t *a, occ_t v) { composite_t *tmp; tmp = arena_alloc_composite(m, n + 2); init_update(tmp, f, n, a, v); return tmp; }
composite_t *new_update_composite(occ_t f, uint32_t n, occ_t *a, occ_t v) { composite_t *tmp; tmp = alloc_composite(n + 2); init_update(tmp, f, n, a, v); return tmp; }
//init //Initializes variables in main and in other files void init() { seconds = 0; #ifdef DEBUG_ACTIVE //Only if we are debugging, we initialize the varialbes in the debug file debug_init(); #endif init_update(); //We initialize variables in other files #ifdef DEBUG_ACTIVE movement_init(); #endif phase1_init(); phase2_init(); }
static void *update_thread(void *data) { struct update_info *info = data; int cur_version; if (!init_update(info)) return NULL; cur_version = update_local_version(info); update_remote_version(info, cur_version); os_rmdir(info->temp); if (info->etag_local) bfree(info->etag_local); if (info->etag_remote) bfree(info->etag_remote); return NULL; }