android_system_core/include
Mark Salyzyn fc148f7f33 liblog: add IF_ALOG_RATELIMIT
IF_ALOG_RATELIMIT()
    ALOGE("Only one message globally using IF_ALOG_RATELIMIT()"
          " in the process may appear ever ten seconds,"
          " (%s)", strerror(errno));

static time_t last; /* initial state zero */
IF_ALOG_RATELIMIT_LOCAL(60, &last)
    ALOGE("Only one message locally may appear every minute,"
          " (%s)", strerror(errno));

These new calls are guaranteed not to affect the value of a
non-zero errno to simplify logging of errors.  However, the
ALOGE calls in the above examples may update the errno value
upon their return.

Test: gTest liblog-unit-tests --gtest_filter=liblog.__android_log_ratelimit
Bug: 33535908
Change-Id: Id8cc192fc7d14504ffd418933cf88ae945c089f2
2016-12-21 21:36:14 +00:00
..
android liblog: restructure log/log.h and android/log.h 2016-10-24 11:03:49 -07:00
backtrace Test for _WIN32 in instead of USE_MINGW. 2016-10-05 09:37:44 -07:00
cutils Define range of GIDs for cached app data. 2016-12-13 13:28:08 -07:00
log liblog: add IF_ALOG_RATELIMIT 2016-12-21 21:36:14 +00:00
nativebridge Allow different namespace types for different classloaders 2016-11-04 15:21:13 -07:00
private Define range of GIDs for cached app data. 2016-12-13 13:28:08 -07:00
system Merge "[qemu]: Fix payload size format in qemu_pipe_frame_send()" am: e5976bea7a am: 8c274361fb 2016-09-30 18:00:16 +00:00
sysutils Fix vold vulnerability in FrameworkListener am: 470484d2a2 am: e9e046df6c am: 109024f74a am: b906ad88b9 am: 2fadbb93a4 am: e04054d9bb 2016-08-19 22:36:29 +00:00
utils libutils: allow multiple ATRACE_NAMEs in a scope. 2016-12-12 12:28:04 -08:00
ziparchive ziparchive: Allow ExtractEntryToFile() to work with block device. 2016-11-15 10:19:04 -08:00