summaryrefslogtreecommitdiff
path: root/libc/src/threads
AgeCommit message (Collapse)Author
2021-08-23[libc] Add a multi-waiter mutex test.Siva Chandra Reddy
A corresponding adjustment to mtx_lock has also been made.
2021-05-05[libc] Normalize LIBC_TARGET_MACHINEGuillaume Chatelet
Current implementation defines LIBC_TARGET_MACHINE with the use of CMAKE_SYSTEM_PROCESSOR. Unfortunately CMAKE_SYSTEM_PROCESSOR is OS dependent and can produce different results. An evidence of this is the various matchers used to detect whether the architecture is x86. This patch normalizes LIBC_TARGET_MACHINE and renames it LIBC_TARGET_ARCHITECTURE. I've added many architectures but we may want to limit ourselves to x86 and ARM. Differential Revision: https://reviews.llvm.org/D101524
2021-01-09[libc][NFC] add includes for internal headers to all libc functionsMichael Jones
this will make sure that all of the functions are using the correct prototypes. Explained much better in the comments of this diff: https://reviews.llvm.org/D94195
2021-01-08[libc] Switch to use a macro which does not insert a section for every libc ↵Michael Jones
function. Summary: The new macro also inserts the C alias for the C++ implementations without needing an objcopy based post processing step. The CMake rules have been updated to reflect this. More CMake cleanup can be taken up in future rounds and appropriate TODOs have been added for them. Reviewers: mcgrathr, sivachandra Subscribers:
2020-05-28[libc] Add implementation of call_once from threads.h.Siva Chandra Reddy
Reviewers: abrachet, maskray Differential Revision: https://reviews.llvm.org/D79828
2020-05-28[libc][NFC][Obvious] Fix few header guards in src/threads.Siva Chandra Reddy
2020-05-13[libc] Call mtx_init in mtx_test.Siva Chandra Reddy
A typo which was caught has also been fixed. Reviewers: abrachet Differential Revision: https://reviews.llvm.org/D79826
2020-05-12[libc][Obvious] Fix deps of few threads targets.Siva Chandra Reddy
A missing dep has been added, and a few redundent deps have been removed.
2020-04-23[libc] Surround get_start_args_addr in __llvm_libc namespace.Paula Toth
Summary: Caught by libc-tidy from patch D77281. Reviewers: sivachandra Reviewed By: sivachandra Subscribers: tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D78700
2020-04-10[libc] Add fully-qualified target names.Siva Chandra Reddy
Only targets setup by the special LLVM libc rules now have fully qualified names. The naming style is similar to fully qualified names in Python. Reviewers: abrachet, PaulkaToast, phosek Differential Revision: https://reviews.llvm.org/D77340
2020-04-08[libc][NFC] Make all top of file comments consistent.Paula Toth
Summary: Made all header files consistent based of this documentation: https://llvm.org/docs/CodingStandards.html#file-headers. And did the same for all source files top of file comments. Reviewers: sivachandra, abrachet Reviewed By: sivachandra, abrachet Subscribers: MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D77533
2020-04-06[libc] NFC: Fix trivial typo in comments, documents, and messagesKazuaki Ishizaki
Differential Revision: https://reviews.llvm.org/D77462
2020-03-28[libc][NFC] Ensure internal implementation is in __llvm_libc namespaceAlex Brachet
Summary: In preparation for D76818. Reviewers: PaulkaToast, sivachandra, gchatelet Reviewed By: PaulkaToast, sivachandra Subscribers: MaskRay, tschuett, libc-commits Differential Revision: https://reviews.llvm.org/D76967
2020-03-09[libc] Add simple implementations of mtx_lock and mtx_unlock.Siva Chandra Reddy
These functions only support locking and unlocking of plain mutexes. They will be extended in future changes to handled recursive and timed mutexes. Reviewers: phosek Differential Revision: https://reviews.llvm.org/D74653
2020-03-09[libc] Take 2: Add linux implementations of thrd_create and thrd_join functions.Siva Chandra Reddy
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
2020-03-05[libc]Revert "Add linux implementations of thrd_create and thrd_join functions."Siva Chandra Reddy
This reverts commit abc040e9533011a62a25c93b07b4fc31c8a641f7 as the bots are failing because of this.
2020-03-05[libc] Add linux implementations of thrd_create and thrd_join functions.Siva Chandra Reddy
Reviewers: abrachet, phosek Differential Revision: https://reviews.llvm.org/D75380