platform_system_core/include/log
Mark Salyzyn 2d2e0a5c5e liblog: resolve deadlocks
Although ever present, an increased regression introduced with
commit b6bee33182 (liblog: logd:
support logd.timestamp = monotonic).

A signal handler can interrupt in locked context, if log is written
in the signal handler, we are in deadlock. To reduce the contention
and chances for this problem separate out timestamp lock from is
loggable lock to reduce contention situations. Provide a best-guess
response if lock would fail in timestamp path.

Use a common lock() inline within each module, with a comment speaking
to the issues surrounding calling a function that has a mutex within
a signal handler.

ToDo: Hold off signals temporarily in mainline, restart when unblock.
      Can not use pthread_sigmask(SIG_BLOCK,,) as it breaks AtCmd.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 25563384
Change-Id: I47e2c87c988c3e359eb9eef129c6a3a08e9eedef
2015-11-19 13:14:16 -08:00
..
event_tag_map.h Move liblog headers to system/core/include/log 2013-07-24 12:32:39 -07:00
log.h liblog: resolve deadlocks 2015-11-19 13:14:16 -08:00
log_read.h liblog: Add log_time += operator 2015-01-05 16:27:54 +00:00
logd.h Kill HAVE_PTHREADS. 2015-01-27 14:23:22 -08:00
logger.h liblog: add android_log_timestamp() private function 2015-10-29 14:23:42 -07:00
logprint.h liblog: logcat: add epoch and monotonic format modifiers 2015-10-29 14:23:42 -07:00
uio.h Only Windows doesn't have <sys/uio.h>. 2014-11-25 13:27:43 -08:00