mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 17:43:35 -04:00
Description:add thread name
Match-id-969f827bd02afa09506a41ba7bc6f3760b1b64fd
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <cstring>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
#include <sstream>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
@@ -177,6 +178,10 @@ bool DistributedInputHandler::InitCollectEventsThread()
|
||||
|
||||
void *DistributedInputHandler::CollectEventsThread(void *param)
|
||||
{
|
||||
int32_t ret = pthread_setname_np(pthread_self(), COLLECT_EVENT_THREAD_NAME);
|
||||
if (ret != 0) {
|
||||
DHLOGE("CollectEventsThread setname failed.");
|
||||
}
|
||||
DistributedInputHandler *pThis = reinterpret_cast<DistributedInputHandler *>(param);
|
||||
|
||||
std::string deviceId;
|
||||
|
||||
Reference in New Issue
Block a user