fix[mpp_thread]: Fix thread name is not set

https://github.com/rockchip-linux/mpp/pull/887

Change-Id: I96937a2fb42cb40f60d432ead3c826b6d89bee23
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
wangbin 2025-08-11 20:22:52 +08:00 committed by Herman Chen
parent 32767f39fb
commit 9751e7ac96

View file

@ -63,12 +63,10 @@ void mpp_thread_start(MppThread *thread)
if (mpp_thread_get_status(thread, THREAD_WORK) == MPP_THREAD_UNINITED) {
mpp_thread_set_status(thread, MPP_THREAD_RUNNING, THREAD_WORK);
if (0 == pthread_create(&thread->thd, &attr, thread->func, thread->ctx)) {
#ifndef __linux__
int ret = pthread_setname_np(thread->thd, thread->name);
if (ret) {
mpp_err("thread %p setname %s failed\n", thread->func, thread->name);
}
#endif
thread_dbg(THREAD_DBG_FUNC, "thread %s %p context %p create success\n",
thread->name, thread->func, thread->ctx);
} else {