Beispiel #1
0
static void UCS_F_DTOR ucs_cleanup(void)
{
    ucs_async_global_cleanup();
    ucs_profile_global_cleanup();
    ucs_debug_cleanup(0);
    ucs_memtrack_cleanup();
#if ENABLE_STATS
    ucs_stats_cleanup();
#endif
    ucs_log_cleanup();
}
Beispiel #2
0
void __ucs_abort(const char *file, unsigned line, const char *function,
                 const char *message, ...)
{
    size_t buffer_size = ucs_global_opts.log_buffer_size;
    const char *short_file;
    char *buffer;
    va_list ap;

    buffer = ucs_alloca(buffer_size + 1);
    va_start(ap, message);
    vsnprintf(buffer, buffer_size, message, ap);
    va_end(ap);

    short_file = strrchr(file, '/');
    short_file = (short_file == NULL) ? file : short_file + 1;
    ucs_log_fatal_error("%13s:%-4u %s", short_file, line, buffer);

    ucs_log_flush();
    ucs_debug_cleanup();
    ucs_handle_error();
    abort();
}