2a6811b4d1
The current system of using atomics isn't thread safe and may result in doubly closing FDs or closing actively used FDs. The safest way to do this is to use a rwlock, which should not have a much higher overhead than the atomics do, as a vast majority of the time, there will not be writers. This moves us further away from using the transport interface, which will be removed. Each writer should be self contained, without a separate open or available function. Also, keep the pmsg fd open if it is opened by __android_log_pmsg_file_write(). This fd was closed due to issues with zygote, but it looks like it is only called by recovery now, so there is no reason to close this fd at the end of that function. Test: logging works, liblog-unit-tests Change-Id: I345c9a5d18c55b11a280c8362df854784abf46fd |
||
---|---|---|
.. | ||
Android.bp | ||
AndroidTest.xml | ||
libc_test.cpp | ||
liblog_benchmark.cpp | ||
liblog_host_test.cpp | ||
liblog_test.cpp | ||
log_id_test.cpp | ||
log_radio_test.cpp | ||
log_read_test.cpp | ||
log_system_test.cpp | ||
log_time_test.cpp | ||
log_wrap_test.cpp | ||
logprint_test.cpp | ||
rwlock_test.cpp |