Files
scylladb/core/stdio.hh
Avi Kivity a8698fa17c core: demangle stdout
When using print() to debug on smp, it is very annoying to get interleaved
output.

Fix by wrapping stdout with a fake stream that has a line buffer for each
thread.
2015-02-19 09:26:17 +02:00

13 lines
264 B
C++

/*
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/
#pragma once
#include <stdio.h>
// Returns a FILE* that writes all its output to @out, but attempts
// not to mix lines if multiple threads write to it simultaenously.
FILE* smp_synchronize_lines(FILE* out);