Commit 3d61d5a5 authored by Jens Korinth's avatar Jens Korinth
Browse files

libtapasco: tapasco_logging_exit -> tapasco_logging_deinit

parent 9a0cb133
......@@ -45,7 +45,7 @@ LIBTAPASCO_LOGLEVELS
} tapasco_ll_t;
int tapasco_logging_init(void);
void tapasco_logging_exit(void);
void tapasco_logging_deinit(void);
#ifdef NDEBUG
inline void tapasco_log(tapasco_ll_t const level, char *fmt, ...) {}
#else
......
......@@ -37,7 +37,7 @@ static
void _flush_logs_on_sigint(int sig)
{
LOG(LALL_INIT, "caught SIGINT, flushing logs and leaving the sinking ship");
tapasco_logging_exit();
tapasco_logging_deinit();
platform_logging_deinit();
exit(sig);
}
......@@ -117,5 +117,5 @@ void tapasco_deinit(tapasco_ctx_t *ctx)
free(ctx);
}
LOG(LALL_INIT, "all's well that ends well, bye");
tapasco_logging_exit();
tapasco_logging_deinit();
}
......@@ -132,7 +132,7 @@ int tapasco_logging_init(void)
return 1;
}
void tapasco_logging_exit(void)
void tapasco_logging_deinit(void)
{
struct log_msg_t *lm;
exiting = true;
......@@ -149,5 +149,5 @@ void tapasco_logging_exit(void)
}
#else // NDEBUG
int tapasco_logging_init(void) { return 1; }
void tapasco_logging_exit(void) {}
void tapasco_logging_deinit(void) {}
#endif // NDEBUG
......@@ -54,6 +54,6 @@ int main(int argc, char *argv[])
printf("all threads joined.\n");
tapasco_async_deinit(a);
tapasco_logging_exit();
tapasco_logging_deinit();
}
/* vim: set foldmarker=@{,@} foldlevel=0 foldmethod=marker : */
......@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
free(_rnd_data);
printf("Finished the test.\n");
tapasco_logging_exit();
tapasco_logging_deinit();
return EXIT_SUCCESS;
err_invalid_argument:
......@@ -214,7 +214,7 @@ err_random_data:
fprintf(stderr, "Could not prepare random data: %s\n",
strerror(errno));
err:
tapasco_logging_exit();
tapasco_logging_deinit();
exit(EXIT_FAILURE);
}
/* main @} */
......
......@@ -43,7 +43,7 @@ int main(void)
srunner_run_all(sr, CK_VERBOSE);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
tapasco_logging_exit();
tapasco_logging_deinit();
return number_failed == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
......@@ -25,6 +25,11 @@
#include <iostream>
#include "debug-screens/TapascoDebugMenu.hpp"
extern "C" {
void tapasco_logging_deinit(void);
void platform_logging_deinit(void);
}
static void init_ncurses()
{
initscr();
......@@ -65,4 +70,7 @@ int main(int argc, char *argv[])
cerr << "ERROR" << endl;
throw;
}
tapasco_logging_deinit();
platform_logging_deinit();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment