POSIX locking and unlocking functions flockfile and funlockfile have
also been added. The locking is not recursive yet. A future patch will
make the underlying lock a recursive lock.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D123986
Not all attributes have been added to phtread_attr_t in this patch. They
will be added gradually in future patches.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D123423
A simple implementation of the getters and setters has been added. More
logic can be added to them in future as required.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D122969
Add support for getenv as defined by the Open Group's "System Interface &
Header" in https://pubs.opengroup.org/onlinepubs/7908799/xsh/getenv.html
getenv requires a standard way of accessing the environment,
so a pointer to the environment is added to the startup in crt1.
Consquently, this function is not usable on top of other libcs.
Added starts_with method to StringView. getenv function uses it.
Co-authored-by: Jeff Bailey <jeffbailey@google.com>
Reviewed By: sivachandra, rtenneti
Differential Revision: https://reviews.llvm.org/D119403
They are implemented as simple syscall wrappers. The file creation
macros have been put in a header file as a temporary solution until we
have a cleaner approach to listing platform relevant macros.
Reviewed By: abrachet
Differential Revision: https://reviews.llvm.org/D118396
Adds an implementation for stpcpy and stpncpy, which are posix extension
functions.
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D111913
Add an implementation for memccpy and mempcpy. These functions are
posix extensions for the moment.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D111762
Summary: Adds `write` for Linux and FDReader utility which should be useful for some stdio tests as well.
Reviewers: sivachandra, PaulkaToast
Reviewed By: sivachandra
Subscribers: mgorny, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D78184
A target to generate the std C threads.h file has been added. This
utilizes the new feature added in this change.
Reviewers: phosek
Differential Revision: https://reviews.llvm.org/D75379
Summary:
A set of of linux x86_64 internal syscall helpers have also been added.
This change does not try to be perfect with respect to OS and machine
abstractions. A TODO note has been added at places where such abstractions
would help and make the arrangement scalable and cleaner. Addressing the
TODOs and building such abstractions is not in the scope of this change.
It is hoped that follow up changes cleaning up the problem areas and
addressing the TODOs will better illustrate the need for the changes.
This change also does not try to imitate mmap and munmap implementations
of other libcs. The idea here is to put in the bare minimum required to
obtain a working mmap and munmap, and then add the rest of the
functionality on an as needed basis.
Reviewers: abrachet, phosek, stanshebs, theraven
Subscribers: mgorny, MaskRay, jfb, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D71634