HomePhabricator

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

Authored by sivachandra on Fri, Mar 6, 3:05 PM.

Description

[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.

  1. 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