[all-commits] [llvm/llvm-project] 25564d: [libc] Implement pthread_attr_[gs]etinheritsched (...

Pavel Labath via All-commits all-commits at lists.llvm.org
Wed Sep 16 02:30:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25564da401e7a93404bd116fe81ded7c94544a05
      https://github.com/llvm/llvm-project/commit/25564da401e7a93404bd116fe81ded7c94544a05
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2026-09-16 (Wed, 16 Sep 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/pthread-macros.h
    M libc/include/llvm-libc-types/pthread_attr_t.h
    M libc/include/pthread.yaml
    M libc/src/pthread/CMakeLists.txt
    A libc/src/pthread/pthread_attr_getinheritsched.cpp
    A libc/src/pthread/pthread_attr_getinheritsched.h
    M libc/src/pthread/pthread_attr_init.cpp
    M libc/src/pthread/pthread_attr_init.h
    A libc/src/pthread/pthread_attr_setinheritsched.cpp
    A libc/src/pthread/pthread_attr_setinheritsched.h
    M libc/test/src/pthread/CMakeLists.txt
    M libc/test/src/pthread/pthread_attr_test.cpp

  Log Message:
  -----------
  [libc] Implement pthread_attr_[gs]etinheritsched (#223322)

This patch implements pthread_attr_setinheritsched and
pthread_attr_getinheritsched.

Like the previous scheduler attribute patches, this commit only operates
on the pthread_attr_t object and does not attempt to install scheduling
parameters when creating a new thread.

Unlike schedpolicy and schedparam, where the validity of arguments is
checked by the kernel, inheritsched is purely a userspace pthread
concept. Therefore, we validate the inheritsched argument and reject
unsupported values with EINVAL.

While in there:
- update the file headers in pthread_attr_init to the modern llvm format
- use proxy headers instead of direct pthread.h inclusion

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