Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Oct 22, 2023
1 parent 13780e4 commit b7eaafc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion be/src/agent/cgroup_cpu_ctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.

#include "agent/cgroup_cpu_ctl.h"
#include "util/thread.h"

#include <fmt/format.h>

Expand Down Expand Up @@ -120,7 +121,7 @@ Status CgroupV1CpuCtl::add_thread_to_cgroup() {
if (!_init_succ) {
return Status::OK();
}
int tid = static_cast<int>(syscall(SYS_gettid));
int tid = static_cast<int>(Thread::current_thread_id());
std::string msg = "add thread " + std::to_string(tid) + " to group";
std::lock_guard<std::shared_mutex> w_lock(_lock_mutex);
return CgroupCpuCtl::write_cg_sys_file(_cgroup_v1_cpu_tg_task_file, tid, msg, true);
Expand Down

0 comments on commit b7eaafc

Please sign in to comment.