[all-commits] [llvm/llvm-project] 053c94: [libc] Implement CPU_ALLOC and CPU_FREE (#202349)

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Jun 11 09:15:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 053c94e66386931494074db1db02818ab0f9bec9
      https://github.com/llvm/llvm-project/commit/053c94e66386931494074db1db02818ab0f9bec9
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M libc/config/linux/aarch64/entrypoints.txt
    M libc/config/linux/riscv/entrypoints.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/include/llvm-libc-macros/linux/sched-macros.h
    M libc/include/llvm-libc-types/cpu_set_t.h
    M libc/include/sched.yaml
    M libc/src/sched/CMakeLists.txt
    M libc/src/sched/linux/CMakeLists.txt
    A libc/src/sched/linux/sched_cpualloc.cpp
    A libc/src/sched/linux/sched_cpufree.cpp
    A libc/src/sched/sched_cpualloc.h
    A libc/src/sched/sched_cpufree.h
    M libc/test/src/sched/CMakeLists.txt
    A libc/test/src/sched/cpu_alloc_test.cpp

  Log Message:
  -----------
  [libc] Implement CPU_ALLOC and CPU_FREE (#202349)

Like the other macros, this commit uses an internal (__-prefixed)
entrypoint.

I added an internal typedef for the mask type to make bit set
calculations slightly safer. I also removed the comment about supporting
larger cpu counts, as increasing the struct size is not necessary to do
that -- that's what these macros are for. Increasing it would be
necessary to support operations on the fixed-size cpu sets, but that
cannot be done lightly due to ABI stability.

I added a test that checks allocations for both small and large cpu set
sizes.

Assisted by Gemini.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list