File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1111#include " src/__support/common.h" // LLVM_LIBC_FUNCTION
1212#include " src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
1313
14+ #include " hdr/sched_macros.h" // NCPUBITS
1415#include " hdr/types/cpu_set_t.h"
1516#include " hdr/types/size_t.h"
1617
1718namespace LIBC_NAMESPACE_DECL {
1819
1920LLVM_LIBC_FUNCTION (void , __sched_setcpuset,
2021 (int cpu, const size_t cpuset_size, cpu_set_t *set)) {
21- if (cpu / 8 < cpuset_size) {
22- const size_t element_index = cpu / NCPUBITS;
23- const size_t bit_position = cpu % NCPUBITS;
22+ if (static_cast < size_t >( cpu) / 8 < cpuset_size) {
23+ const size_t element_index = static_cast < size_t >( cpu) / NCPUBITS;
24+ const size_t bit_position = static_cast < size_t >( cpu) % NCPUBITS;
2425
2526 const unsigned long mask = 1UL << bit_position;
2627 set->__bits [element_index] |= mask;
You can’t perform that action at this time.
0 commit comments