[libc] Add dirent.h functions opendir, readdir, closedir and dirfd.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D130459
[libc][NFC] Move thread platform data pointer to thread attributes.Along the way, added constexpr constructors to the Thread datastructures.
[libc] Add pthread_create and pthread_join functions.They do not yet support all the feature/attributes in pthread_attr_t.Future changes will add such support.Reviewed By: lntueDifferential Re
[libc] Add pthread_create and pthread_join functions.They do not yet support all the feature/attributes in pthread_attr_t.Future changes will add such support.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D126718
show more ...
[libc] Keep all thread state information separate from the thread structure.The state is now stored on the thread's stack memory. This enablesimplementing pthread API like pthread_detach which tak
[libc] Keep all thread state information separate from the thread structure.The state is now stored on the thread's stack memory. This enablesimplementing pthread API like pthread_detach which takes the pthread_tstructure argument by value.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D126716
[libc] Add the pthread_mutex_t type.Simple implementations of the functions pthread_mutex_init,pthread_mutex_destroy, pthread_mutex_lock and pthread_mutex_unlock havehave also been added. Future
[libc] Add the pthread_mutex_t type.Simple implementations of the functions pthread_mutex_init,pthread_mutex_destroy, pthread_mutex_lock and pthread_mutex_unlock havehave also been added. Future patches will extend these functions to addfeatures required by the POSIX specification.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D126235
[libc] Add the implementation of the GNU extension function fopencookie.Reviewed By: lntue, michaelrjDifferential Revision: https://reviews.llvm.org/D124141
[libc] Add a definition of pthread_attr_t and its getters and setters.Not all attributes have been added to phtread_attr_t in this patch. Theywill be added gradually in future patches.Reviewed B
[libc] Add a definition of pthread_attr_t and its getters and setters.Not all attributes have been added to phtread_attr_t in this patch. Theywill be added gradually in future patches.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D123423
[libc] Add a linux Thread class in __support/threads.This change is essentially a mechanical change which moves the threadcreation and join implementations from src/threads/linux tosrc/__support/
[libc] Add a linux Thread class in __support/threads.This change is essentially a mechanical change which moves the threadcreation and join implementations from src/threads/linux tosrc/__support/threads/linux/thread.h. The idea being that, in future, apthread implementation can reuse the common thread implementations insrc/__support/threads.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D123287
[libc] Add pthread_mutexattr_t type and its setters and getters.A simple implementation of the getters and setters has been added. Morelogic can be added to them in future as required.Reviewed B
[libc] Add pthread_mutexattr_t type and its setters and getters.A simple implementation of the getters and setters has been added. Morelogic can be added to them in future as required.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D122969
[libc][NFC] Add a platform independent thread support library.The idea is that, other parts of the libc which require thread/locksupport will be able to use this platform independent setup.With
[libc][NFC] Add a platform independent thread support library.The idea is that, other parts of the libc which require thread/locksupport will be able to use this platform independent setup.With this change, only the linux implementation of a mutex type has beenmoved to the new library. Because of this, there is some duplicationbetween the new library and src/threads/linux. A follow up change willmove all of src/threads/linux to the new library. The duplication shouldbe eliminated with that move.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D120795
[libc][NFC] Add a static assert for futex size.
[libc] Remove the remaining uses of stdatomic.h.New methods to the Atomic class have been added as required. Futexrelated types have been consolidated at a common place.Reviewed By: lntueDiffe
[libc] Remove the remaining uses of stdatomic.h.New methods to the Atomic class have been added as required. Futexrelated types have been consolidated at a common place.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D120705
[libc] Add a class "Atomic" as a simple equivalent of std::atomic.Only the methods currently required by the libc have been added.Most of the existing uses of atomic operations have been switched
[libc] Add a class "Atomic" as a simple equivalent of std::atomic.Only the methods currently required by the libc have been added.Most of the existing uses of atomic operations have been switched overto this new class. A future change will clean up the rest of uses.This change now allows building mutex and condition variable code with aC++ compiler which does not have stdatomic.h, for example g++.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D120642
[libc] Add exit and atexitOften atexit is implemented using __cxa_atexit. I have not implemented __cxa_atexit here because it potentially requires more discussion. It is unique for llvm-libc (I thi
[libc] Add exit and atexitOften atexit is implemented using __cxa_atexit. I have not implemented __cxa_atexit here because it potentially requires more discussion. It is unique for llvm-libc (I think) that it is an exported symbol that wouldn’t be defined in any spec file because it doesn’t have a header. Implementing it will be trivial given what is here already, but I figured it would be more contentious so it can be implemented later.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D119512
[libc] Add POSIX close, fsync, open, read and write functions.They are implemented as simple syscall wrappers. The file creationmacros have been put in a header file as a temporary solution until
[libc] Add POSIX close, fsync, open, read and write functions.They are implemented as simple syscall wrappers. The file creationmacros have been put in a header file as a temporary solution until wehave a cleaner approach to listing platform relevant macros.Reviewed By: abrachetDifferential Revision: https://reviews.llvm.org/D118396
[libc][NFC] Add 'struct_' prefix to type headers defining struct types.This allows header generator to generate type inclusion boiler plate ina straightforward manner.
[libc] Move the remaining public types to their own type headers.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D117838
[libc] Move type definitions to their own self contained header files.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D117282