From e09ae01f6777434f41ba8a5a564c8078565ecfea Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 19 Aug 2020 06:59:53 -0400 Subject: vppinfra: minor tweaks for cgo interoperation 'type' is a keyword in golang, so s/type/event_type/ in elog.h and elsewhere. Add vec_len_not_inline(...), elog_write_file_not_inline(...) and elog_read_file_not_inline(...) since the inline forms aren't usable. More such tweaks may follow. Type: improvement Signed-off-by: Dave Barach Change-Id: I9a80a6afa635f5cdedee554ee9abe400fafc1cb6 --- src/vppinfra/elog.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/vppinfra/elog.h') diff --git a/src/vppinfra/elog.h b/src/vppinfra/elog.h index 9f957e336d0..ee63d5b491b 100644 --- a/src/vppinfra/elog.h +++ b/src/vppinfra/elog.h @@ -68,7 +68,7 @@ typedef struct }; /** Event type index. */ - u16 type; + u16 event_type; /** Track for this event. Tracks allow events to be sorted and displayed by track. Think of 2 dimensional display with time and @@ -324,7 +324,7 @@ elog_event_data_inline (elog_main_t * em, e = vec_elt_at_index (em->event_ring, ei); e->time_cycles = cpu_time; - e->type = type_index; + e->event_type = type_index; e->track = track_index; /* Return user data for caller to fill in. */ @@ -543,6 +543,9 @@ elog_write_file (elog_main_t * em, char *clib_file, int flush_ring) return error; } +clib_error_t *elog_write_file_not_inline (elog_main_t * em, char *clib_file, + int flush_ring); + always_inline clib_error_t * elog_read_file (elog_main_t * em, char *clib_file) { @@ -558,6 +561,8 @@ elog_read_file (elog_main_t * em, char *clib_file) return error; } +clib_error_t *elog_read_file_not_inline (elog_main_t * em, char *clib_file); + #endif /* CLIB_UNIX */ #endif /* included_clib_elog_h */ -- cgit 1.2.3-korg