wsl/hsakmt: Ensure Immediate Output of Debug and Warning Messages
Added fflush(stderr) to the WARN_ONCE and debug_print macros in utils.h to ensure that warning and debug messages are immediately flushed to the standard error stream. Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com> Reviewed-by: Flora Cui <flora.cui@amd.com> Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/36>
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
Frank Min
γονέας
954807feff
υποβολή
09f8f15d90
@@ -126,6 +126,7 @@ static __forceinline unsigned long long int strtoull(const char* str,
|
||||
if (!(exp) && (limit == 0 || count < limit)) { \
|
||||
fprintf(stderr, "Warning: " STRING(exp) " in %s, " __FILE__ ":" STRING(__LINE__) "\n", \
|
||||
__PRETTY_FUNCTION__); \
|
||||
fflush(stderr); \
|
||||
count++; \
|
||||
} \
|
||||
} while (false)
|
||||
@@ -140,6 +141,7 @@ static __forceinline unsigned long long int strtoull(const char* str,
|
||||
#define debug_print(fmt, ...) \
|
||||
do { \
|
||||
fprintf(stderr, fmt, ##__VA_ARGS__); \
|
||||
fflush(stderr); \
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user