Fix IQ recorder/player for nrUE

This commit is contained in:
Bruno Mongazon-Cazavet
2023-02-17 12:00:46 +01:00
parent f984f49310
commit 8601b8c990
28 changed files with 331 additions and 150 deletions
+13 -1
View File
@@ -19,7 +19,19 @@
#define ENABLE_USE_CPU_EXECUTION_TIME
#include "../LOG/vcd_signal_dumper.c"
void err(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
/*
* Dummy needed by assertions.h
*/
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
if (assert) {
abort();
} else {
exit(EXIT_SUCCESS);
}
}
void err(char *fmt, ...) __attribute__((format(printf, 1, 2)));
void err(char *fmt, ...)
{
va_list ap;
+13 -10
View File
@@ -30,16 +30,19 @@
#include <platform_types.h>
#include "backtrace.h"
#define _Assert_Exit_ \
if (getenv("gdbStacks")) { \
char tmp [1000]; \
sprintf(tmp,"gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid()); \
__attribute__((unused)) int dummy=system(tmp); \
} \
fprintf(stderr, "\nExiting execution\n"); \
fflush(stdout); \
fflush(stderr); \
abort();
#define EXIT_NORMAL 0
#define EXIT_ASSERT 1
#define _Assert_Exit_ \
if (getenv("gdbStacks")) { \
char tmp[1000]; \
sprintf(tmp, "gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid()); \
__attribute__((unused)) int dummy = system(tmp); \
} \
fprintf(stderr, "\nExiting execution\n"); \
fflush(stdout); \
fflush(stderr); \
exit_function(__FILE__, __FUNCTION__, __LINE__, "_Assert_Exit_", EXIT_ASSERT);
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
do { \
+7 -1
View File
@@ -2,5 +2,11 @@
int T_stdout;
#endif
void exit_function(const char *file, const char *function, const int line, const char *s) {
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
if (assert) {
abort();
} else {
exit(EXIT_SUCCESS);
}
}
+7 -1
View File
@@ -176,7 +176,13 @@ void initFloatingCoresTpool(int nbThreads,tpool_t *pool, bool performanceMeas, c
#ifdef TEST_THREAD_POOL
volatile int oai_exit=0;
void exit_function(const char *file, const char *function, const int line, const char *s) {
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
if (assert) {
abort();
} else {
exit(EXIT_SUCCESS);
}
}
struct testData {