Changeset: ad1e7ae319a2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ad1e7ae319a2 Modified Files: gdk/gdk_logger.c Branch: Jun2023 Log Message:
Use defined instead of static inline for lock functions. Usually I like using static inline functions instead of function-like defines, but not if it's in the way of debugging (in this case, MT_lock_set may record the location from which it is called, which only works if it's called directly, i.e. not through a static inline function). diffs (43 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1038,17 +1038,8 @@ log_create_types_file(logger *lg, const return GDK_SUCCEED; } -static inline void -rotation_lock(logger *lg) -{ - MT_lock_set(&lg->rotation_lock); -} - -static inline void -rotation_unlock(logger *lg) -{ - MT_lock_unset(&lg->rotation_lock); -} +#define rotation_lock(lg) MT_lock_set(&(lg)->rotation_lock) +#define rotation_unlock(lg) MT_lock_unset(&(lg)->rotation_lock) static gdk_return log_open_output(logger *lg) @@ -3036,17 +3027,8 @@ log_tend(logger *lg) return result; } -static inline void -flush_lock(logger *lg) -{ - MT_lock_set(&lg->flush_lock); -} - -static inline void -flush_unlock(logger *lg) -{ - MT_lock_unset(&lg->flush_lock); -} +#define flush_lock(lg) MT_lock_set(&(lg)->flush_lock) +#define flush_unlock(lg) MT_lock_unset(&(lg)->flush_lock) static inline gdk_return do_flush(logged_range *range) _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org