Beispiel #1
0
tb_void_t tb_trace_sync()
{
    // enter
    tb_spinlock_enter_without_profiler(&g_lock);

    // sync it
    if (g_mode & TB_TRACE_MODE_PRINT) tb_print_sync();

    // sync it to file
    if ((g_mode & TB_TRACE_MODE_FILE) && g_file) tb_file_sync(g_file);

    // leave
    tb_spinlock_leave(&g_lock);
}
Beispiel #2
0
tb_void_t tb_trace_sync()
{
    // enter
    tb_spinlock_enter_without_profiler(&g_lock);

    // sync it
    if (g_mode & TB_TRACE_MODE_PRINT) tb_print_sync();

    // sync it to file
#ifndef TB_CONFIG_MICRO_ENABLE
    if ((g_mode & TB_TRACE_MODE_FILE) && g_file) tb_file_sync(g_file);
#endif

    // leave
    tb_spinlock_leave(&g_lock);
}