Author: Tobias Weber <tobias_webe...@gmx.de> Branch: c8-tcp-style-trx-length Changeset: r2118:e912698faa40 Date: 2017-07-14 20:27 +0200 http://bitbucket.org/pypy/stmgc/changeset/e912698faa40/
Log: Fix missing type definitions for custom payload diff --git a/c8/stm/timing.h b/c8/stm/timing.h --- a/c8/stm/timing.h +++ b/c8/stm/timing.h @@ -1,5 +1,9 @@ #include <time.h> +#define define_payload_types() \ + stm_timing_event_payload_data_t stm_duration_data; \ + stm_timing_event_payload_t stm_duration_payload; + #define continue_timer() clock_gettime(CLOCK_MONOTONIC_RAW, &start); /* Use raw monotonic time, i.e., solely based on local hardware (no NTP @@ -8,8 +12,7 @@ #define start_timer() struct timespec start, stop; \ struct timespec duration = { .tv_sec = 0, .tv_nsec = 0 };\ uint32_t nanosec_diff, sec_diff; \ - stm_timing_event_payload_data_t stm_duration_data; \ - stm_timing_event_payload_t stm_duration_payload; \ + define_payload_types() \ continue_timer() /* Must use start_timer before using this macro. */ @@ -59,5 +62,6 @@ #define publish_custom_value_event(double_value, event) \ set_payload((double_value)) \ + define_payload_types() \ stm_duration_payload(payload_value); \ publish_event(STM_SEGMENT->running_thread, (event)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit