Merge "libutils: more detailed logging." am: ee4cc04429
am: 0a9c29ddfb
Change-Id: I5cb7362e82681d55ce671ec4599c34368f43f5dd
This commit is contained in:
commit
2dfbda57d1
1 changed files with 4 additions and 4 deletions
|
|
@ -76,8 +76,8 @@ Looper::~Looper() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Looper::initTLSKey() {
|
void Looper::initTLSKey() {
|
||||||
int result = pthread_key_create(& gTLSKey, threadDestructor);
|
int error = pthread_key_create(&gTLSKey, threadDestructor);
|
||||||
LOG_ALWAYS_FATAL_IF(result != 0, "Could not allocate TLS key.");
|
LOG_ALWAYS_FATAL_IF(error != 0, "Could not allocate TLS key: %s", strerror(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Looper::threadDestructor(void *st) {
|
void Looper::threadDestructor(void *st) {
|
||||||
|
|
@ -399,8 +399,8 @@ void Looper::wake() {
|
||||||
ssize_t nWrite = TEMP_FAILURE_RETRY(write(mWakeEventFd.get(), &inc, sizeof(uint64_t)));
|
ssize_t nWrite = TEMP_FAILURE_RETRY(write(mWakeEventFd.get(), &inc, sizeof(uint64_t)));
|
||||||
if (nWrite != sizeof(uint64_t)) {
|
if (nWrite != sizeof(uint64_t)) {
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
LOG_ALWAYS_FATAL("Could not write wake signal to fd %d: %s", mWakeEventFd.get(),
|
LOG_ALWAYS_FATAL("Could not write wake signal to fd %d (returned %zd): %s",
|
||||||
strerror(errno));
|
mWakeEventFd.get(), nWrite, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue