[all-commits] [llvm/llvm-project] fd8c13: [libc] Take 2: Add linux implementations of thrd_c...

Siva Chandra via All-commits all-commits at lists.llvm.org
Mon Mar 9 21:40:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fd8c13361348f32acef8f8a972984bb5f0786a0c
      https://github.com/llvm/llvm-project/commit/fd8c13361348f32acef8f8a972984bb5f0786a0c
  Author: Siva Chandra Reddy <sivachandra at google.com>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M libc/cmake/modules/LLVMLibCRules.cmake
    M libc/config/linux/api.td
    A libc/config/linux/threads.h.in
    M libc/include/CMakeLists.txt
    M libc/include/threads.h.def
    M libc/lib/CMakeLists.txt
    M libc/src/CMakeLists.txt
    A libc/src/threads/CMakeLists.txt
    A libc/src/threads/linux/CMakeLists.txt
    A libc/src/threads/linux/thrd_create.cpp
    A libc/src/threads/linux/thrd_join.cpp
    A libc/src/threads/linux/thread_start_args.h.def
    A libc/src/threads/linux/thread_utils.h
    A libc/src/threads/linux/x86_64/thread_start_args.h.in
    A libc/src/threads/thrd_create.h
    A libc/src/threads/thrd_join.h
    M libc/test/src/CMakeLists.txt
    A libc/test/src/threads/CMakeLists.txt
    A libc/test/src/threads/thrd_test.cpp

  Log Message:
  -----------
  [libc] Take 2: Add linux implementations of thrd_create and thrd_join functions.

The following are the differences from the first version:

1. The kernel does not copy the stack for the new thread (it cannot).
The previous version missed this fact. In this new version, the new
thread's start args are copied on to the new stack in a known location
so that the new thread can sniff them out.
2. A start args sniffer for x86_64 has been added.
2. Default stack size has been increased to 64KB.

Reviewers: abrachet, phosek

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




More information about the All-commits mailing list