Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build with ohos toolchain #5105

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ static bool is_smt_cpu(int cpuid)
static int set_sched_affinity(const ncnn::CpuSet& thread_affinity_mask)
{
// set affinity for thread
#if defined(__BIONIC__)
#if defined(__BIONIC__) && !defined(__OHOS__)
pid_t pid = gettid();
#else
pid_t pid = syscall(SYS_gettid);
Expand Down Expand Up @@ -1677,7 +1677,7 @@ static unsigned int get_midr_from_register()
static int get_sched_affinity(ncnn::CpuSet& thread_affinity_mask)
{
// get affinity for thread
#if defined(__BIONIC__)
#if defined(__BIONIC__) && !defined(__OHOS__)
pid_t pid = gettid();
#else
pid_t pid = syscall(SYS_gettid);
Expand Down