summaryrefslogtreecommitdiff
path: root/osi
diff options
context:
space:
mode:
authorPavlin Radoslavov <pavlin@google.com>2016-01-22 10:44:40 -0800
committerPavlin Radoslavov <pavlin@google.com>2016-01-22 10:44:40 -0800
commit4b7f560168f9e7523217d4b372fde4b0adba4d3b (patch)
tree020daaf7a77d4cfa916b447bbf864dce7ea7fb7e /osi
parent10978011f286d20f10eb949e3557ad00a62c8424 (diff)
downloadandroid-system-bt-4b7f560168f9e7523217d4b372fde4b0adba4d3b.tar.gz
android-system-bt-4b7f560168f9e7523217d4b372fde4b0adba4d3b.tar.xz
Add extra log if timer_create(CLOCK_BOOTTIME_ALARM) fails
Add explicit log messages if timer_create(CLOCK_BOOTTIME_ALARM) fails. The most likely reason is the kernel doesn't have the appropriate patches. Bug: 25739638 Change-Id: Icbeaa965d729ba11dfb7cfbb6185b1655b3c6de4
Diffstat (limited to 'osi')
-rw-r--r--osi/src/alarm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/osi/src/alarm.c b/osi/src/alarm.c
index 0b36830..a00aacc 100644
--- a/osi/src/alarm.c
+++ b/osi/src/alarm.c
@@ -659,6 +659,10 @@ static bool timer_create_internal(const clockid_t clock_id, timer_t *timer) {
if (timer_create(clock_id, &sigevent, timer) == -1) {
LOG_ERROR(LOG_TAG, "%s unable to create timer with clock %d: %s",
__func__, clock_id, strerror(errno));
+ if (clock_id == CLOCK_BOOTTIME_ALARM) {
+ LOG_ERROR(LOG_TAG, "The kernel might not have support for timer_create(CLOCK_BOOTTIME_ALARM): https://lwn.net/Articles/429925/");
+ LOG_ERROR(LOG_TAG, "See following patches: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=CLOCK_BOOTTIME_ALARM");
+ }
return false;
}