[all-commits] [llvm/llvm-project] ef0949: [LIBC] Fix incorrect handling of `pthread_join(tid...

goldsteinn via All-commits all-commits at lists.llvm.org
Thu Apr 20 12:54:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef0949828e15d28a92ea04b84d803f1e05bdb1d6
      https://github.com/llvm/llvm-project/commit/ef0949828e15d28a92ea04b84d803f1e05bdb1d6
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-04-20 (Thu, 20 Apr 2023)

  Changed paths:
    M libc/src/__support/threads/thread.h
    M libc/test/integration/src/pthread/CMakeLists.txt
    A libc/test/integration/src/pthread/pthread_join_test.cpp

  Log Message:
  -----------
  [LIBC] Fix incorrect handling of `pthread_join(tid, nullptr)`

Previously unconditionally stored to the return value. This is
incorrect, we should only return if user value is non-null.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D148293


  Commit: 0432b85d8e800439e57642bb25e93c32fa864f5c
      https://github.com/llvm/llvm-project/commit/0432b85d8e800439e57642bb25e93c32fa864f5c
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-04-20 (Thu, 20 Apr 2023)

  Changed paths:
    M libc/config/linux/aarch64/entrypoints.txt
    M libc/config/linux/api.td
    M libc/config/linux/riscv64/entrypoints.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/include/CMakeLists.txt
    M libc/include/llvm-libc-macros/linux/sched-macros.h
    M libc/include/llvm-libc-types/CMakeLists.txt
    A libc/include/llvm-libc-types/struct_sched_param.h
    M libc/spec/linux.td
    M libc/spec/posix.td
    M libc/src/sched/CMakeLists.txt
    M libc/src/sched/linux/CMakeLists.txt
    A libc/src/sched/linux/sched_get_priority_max.cpp
    A libc/src/sched/linux/sched_get_priority_min.cpp
    A libc/src/sched/linux/sched_getparam.cpp
    A libc/src/sched/linux/sched_getscheduler.cpp
    A libc/src/sched/linux/sched_rr_get_interval.cpp
    A libc/src/sched/linux/sched_setparam.cpp
    A libc/src/sched/linux/sched_setscheduler.cpp
    A libc/src/sched/sched_get_priority_max.h
    A libc/src/sched/sched_get_priority_min.h
    A libc/src/sched/sched_getparam.h
    A libc/src/sched/sched_getscheduler.h
    A libc/src/sched/sched_rr_get_interval.h
    A libc/src/sched/sched_setparam.h
    A libc/src/sched/sched_setscheduler.h
    M libc/test/src/sched/CMakeLists.txt
    A libc/test/src/sched/get_priority_test.cpp
    A libc/test/src/sched/param_and_scheduler_test.cpp
    A libc/test/src/sched/sched_rr_get_interval_test.cpp

  Log Message:
  -----------
  [LIBC] Implement remainder of posix 'sched.h' minus `SCHED_SPORADIC`

Includes macros:
    linux/SCHED_OTHER // posix req
    linux/SCHED_FIFO // posix req
    linux/SCHED_RR // posix req
    linux/SCHED_BATCH
    linux/SCHED_ISO
    linux/SCHED_IDLE
    linux/SCHED_DEADLINE

Includes types:
    struct sched_param { int sched_priority; }

Includes functions:
    sched_setparam
    sched_getparam
    sched_setscheduler
    sched_getscheduler
    sched_get_priority_max
    sched_get_priority_min
    sched_rr_get_interval

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D148069


Compare: https://github.com/llvm/llvm-project/compare/8d2bae9abdc3...0432b85d8e80


More information about the All-commits mailing list