dm: set correct thread name

When issue happen, we could identify which thread is impacted.
This could help stability issue debugging.

Tracked-On: #2037
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Yin Fengwei
2018-12-11 14:29:31 +08:00
committed by wenlingz
parent cb31381561
commit 73ab727434
4 changed files with 6 additions and 0 deletions

View File

@@ -340,6 +340,7 @@ static int create_new_server(const char *name)
pdebug();
goto listen_err;
}
pthread_setname_np(mfd->listen_thread, "mngr_listen");
/* create a poll_thread */
mfd->polling = 1;
@@ -348,6 +349,7 @@ static int create_new_server(const char *name)
pdebug();
goto poll_err;
}
pthread_setname_np(mfd->poll_thread, "mngr_pull");
mfd->desc = mfd->fd;
/* add this to mngr_fd_head */