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
18 lines
506 B
C
18 lines
506 B
C
//===--------- Linux specific definitions of types from threads.h ---------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
%%begin()
|
|
|
|
typedef struct {
|
|
unsigned char __clear_tid[4];
|
|
int __tid;
|
|
void *__stack;
|
|
int __stack_size;
|
|
int __retval;
|
|
} thrd_t;
|