Skip to content
Draft
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
12 changes: 12 additions & 0 deletions src/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ int ha_cpuset_set(struct hap_cpuset *set, int cpu)
#elif defined(CPUSET_USE_ULONG)
set->cpuset |= (0x1 << cpu);
return 0;
#else
return 0;
#endif
}

Expand All @@ -42,6 +44,8 @@ int ha_cpuset_clr(struct hap_cpuset *set, int cpu)
#elif defined(CPUSET_USE_ULONG)
set->cpuset &= ~(0x1 << cpu);
return 0;
#else
return 0;
#endif
}

Expand Down Expand Up @@ -96,6 +100,8 @@ int ha_cpuset_count(const struct hap_cpuset *set)

#elif defined(CPUSET_USE_ULONG)
return my_popcountl(set->cpuset);
#else
return 0;
#endif
}

Expand All @@ -120,6 +126,8 @@ int ha_cpuset_ffs(const struct hap_cpuset *set)
return 0;

return my_ffsl(set->cpuset);
#else
return 0;
#endif
}

Expand Down Expand Up @@ -148,6 +156,8 @@ int ha_cpuset_isequal(const struct hap_cpuset *dst, const struct hap_cpuset *src

#elif defined(CPUSET_USE_ULONG)
return dst->cpuset == src->cpuset;
#else
return 0;
#endif
}

Expand All @@ -159,6 +169,8 @@ int ha_cpuset_size()
#elif defined(CPUSET_USE_ULONG)
return LONGBITS;

#else
return 0;
#endif
}

Expand Down