Module: xenomai-3 Branch: next Commit: 5d84bdd945d43a9483ed8440ad833df7abc0d7f5 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=5d84bdd945d43a9483ed8440ad833df7abc0d7f5
Author: Philippe Gerum <r...@xenomai.org> Date: Fri Jul 24 17:52:55 2015 +0200 lib/cobalt: stdio: drop redundant cleanup handler We already flush the print buffers upon exit(), so no need for a cleanup handler running on behalf of the library dtor. --- lib/cobalt/init.c | 5 ----- lib/cobalt/internal.h | 2 -- lib/cobalt/printf.c | 10 ---------- 3 files changed, 17 deletions(-) diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index c9f0217..c67de7b 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -220,11 +220,6 @@ int cobalt_init(void) return 0; } -static void __attribute__((destructor)) __fini_cobalt(void) -{ - cobalt_print_exit(); -} - static int cobalt_parse_option(int optnum, const char *optarg) { switch (optnum) { diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h index 26f1a7c..b0f1019 100644 --- a/lib/cobalt/internal.h +++ b/lib/cobalt/internal.h @@ -51,8 +51,6 @@ void cobalt_print_init(void); void cobalt_print_init_atfork(void); -void cobalt_print_exit(void); - void cobalt_ticks_init(unsigned long long freq); void cobalt_default_mutexattr_init(void); diff --git a/lib/cobalt/printf.c b/lib/cobalt/printf.c index 3381b2a..de8a91f 100644 --- a/lib/cobalt/printf.c +++ b/lib/cobalt/printf.c @@ -773,16 +773,6 @@ void cobalt_print_init(void) atexit(rt_print_flush_buffers); } -void cobalt_print_exit(void) -{ - if (buffers) { - /* Flush the buffers. Do not call print_buffers here - * since we do not know if our stack is big enough. */ - nanosleep(&print_period, NULL); - nanosleep(&print_period, NULL); - } -} - COBALT_IMPL(int, vfprintf, (FILE *stream, const char *fmt, va_list args)) { if (cobalt_get_current() != XN_NO_HANDLE && _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git