# HG changeset patch # User Mike Pavone # Date 1291590259 18000 # Node ID b75ec364ceccc75a1592d12d86d71cd392c92d2c # Parent 50c97b448f44bf41048502b5b07759924cac8028 Fix conflict between name of proviling variable and time function in C stdlib diff -r 50c97b448f44 -r b75ec364cecc cbackend_c.rhope --- a/cbackend_c.rhope Wed Nov 24 02:28:01 2010 +0000 +++ b/cbackend_c.rhope Sun Dec 05 18:04:19 2010 -0500 @@ -1651,7 +1651,7 @@ int32_t rhope(uint32_t func, object ** params, uint16_t numparams, uint16_t callspace) { #ifdef ENABLE_PROFILING - struct timeval time; + struct timeval proftime; #endif uint16_t resume,idx, vcparam_offset, last_vcparam; context *ct,*temp_ct; diff -r 50c97b448f44 -r b75ec364cecc runtime/func.h --- a/runtime/func.h Wed Nov 24 02:28:01 2010 +0000 +++ b/runtime/func.h Sun Dec 05 18:04:19 2010 -0500 @@ -38,21 +38,21 @@ #ifdef ENABLE_PROFILING #define START_PROFILE \ - gettimeofday(&time, NULL);\ + gettimeofday(&proftime, NULL);\ cdata->accum = cdata->self_accum = 0;\ - cdata->self_start = cdata->start = ((uint64_t)time.tv_sec) * 1000000ULL + ((uint64_t)time.tv_usec); + cdata->self_start = cdata->start = ((uint64_t)proftime.tv_sec) * 1000000ULL + ((uint64_t)proftime.tv_usec); #define PAUSE_SELF \ - gettimeofday(&time, NULL);\ - my_cdata->self_accum += ((uint64_t)time.tv_sec) * 1000000ULL + ((uint64_t)time.tv_usec) - my_cdata->self_start; + gettimeofday(&proftime, NULL);\ + my_cdata->self_accum += ((uint64_t)proftime.tv_sec) * 1000000ULL + ((uint64_t)proftime.tv_usec) - my_cdata->self_start; #define AND_TOTAL \ *(my_cdata->myactivationlevel)--;\ - my_cdata->accum += ((uint64_t)time.tv_sec) * 1000000ULL + ((uint64_t)time.tv_usec) - my_cdata->start; + my_cdata->accum += ((uint64_t)proftime.tv_sec) * 1000000ULL + ((uint64_t)proftime.tv_usec) - my_cdata->start; #define RESUME_SELF \ - gettimeofday(&time, NULL);\ - my_cdata->self_start = ((uint64_t)time.tv_sec) * 1000000ULL + ((uint64_t)time.tv_usec); + gettimeofday(&proftime, NULL);\ + my_cdata->self_start = ((uint64_t)proftime.tv_sec) * 1000000ULL + ((uint64_t)proftime.tv_usec); #define AND_RESUME_TOTAL \ *(my_cdata->myactivationlevel)++;\ @@ -62,15 +62,15 @@ free_stack(ct, lv_ ## name);\ func = cdata->func;\ profile_activationlevel[FUNC_ ## name]--;\ - gettimeofday(&time, NULL);\ + gettimeofday(&proftime, NULL);\ if(profile_activationlevel[FUNC_ ## name])\ {\ profile_nestedcounts[FUNC_ ## name]++;\ } else {\ profile_counts[FUNC_ ## name]++;\ - profile_totals[FUNC_ ## name] += ((uint64_t)time.tv_sec) * 1000000ULL + ((uint64_t)time.tv_usec) - cdata->start + cdata->accum;\ + profile_totals[FUNC_ ## name] += ((uint64_t)proftime.tv_sec) * 1000000ULL + ((uint64_t)proftime.tv_usec) - cdata->start + cdata->accum;\ }\ - profile_selftotals[FUNC_ ## name] += ((uint64_t)time.tv_sec) * 1000000ULL + ((uint64_t)time.tv_usec) - cdata->self_start + cdata->self_accum; + profile_selftotals[FUNC_ ## name] += ((uint64_t)proftime.tv_sec) * 1000000ULL + ((uint64_t)proftime.tv_usec) - cdata->self_start + cdata->self_accum; #define Func(name,numparams) \ f_ ## name:\