Set thread names to help debugging.
Have our worker threads call pthread_setname_np() on Linux and Android,
so that they can be easily identified in the thread listing of a
debugger.
BUG=2167
Change-Id: If04b1fa630e82da6f40c9c730eb62cf386fc5a0f
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 6556a9e..ba0f7f2 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -3766,6 +3766,7 @@
++pbi->num_workers;
winterface->init(worker);
+ worker->thread_name = "aom tile worker";
if (worker_idx < num_threads - 1 && !winterface->reset(worker)) {
aom_internal_error(&cm->error, AOM_CODEC_ERROR,
"Tile decoder thread creation failed");
diff --git a/av1/decoder/decoder.c b/av1/decoder/decoder.c
index a5f4fd6..6646ac8 100644
--- a/av1/decoder/decoder.c
+++ b/av1/decoder/decoder.c
@@ -126,6 +126,7 @@
cm->error.setjmp = 0;
aom_get_worker_interface()->init(&pbi->lf_worker);
+ pbi->lf_worker.thread_name = "aom lf worker";
return pbi;
}