[libc] Make the errno macro resolve to the thread local variable directly.With modern architectures having a thread pointer and language supportingthread locals, there is no reason to use a functi
[libc] Make the errno macro resolve to the thread local variable directly.With modern architectures having a thread pointer and language supportingthread locals, there is no reason to use a function intermediary to accessthe thread local errno value.The entrypoint corresponding to errno has been replaced with an objectlibrary as there is no formal entrypoint for errno anymore.Reviewed By: jeffbailey, michaelrjDifferential Revision: https://reviews.llvm.org/D120920
show more ...
[libc][Obvious] Fix typo in mkdir and mkdirat implementations.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D119265
[libc] Add a few missing deps, includes, and fix a few typos.This allows us to enable rmdir, mkdir, mkdirat, unlink and unlinkat foraarch64.
[libc] Add implementations of POSIX mkdir, mkdirat, rmdir, unlink and unlinkat.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D118641
[libc][NFC] Move sys/mman entrypoints to the default build configs.Specifically, mmap and munmap have been moved to the default build listof entrypoints. To support this, certain deps and includes
[libc][NFC] Move sys/mman entrypoints to the default build configs.Specifically, mmap and munmap have been moved to the default build listof entrypoints. To support this, certain deps and includes have beenadjusted. The use of errno in some cases has been updated.
[libc] Move the x86_64 syscall functions to OSUtil.Reviewed By: michaelrj, lntueDifferential Revision: https://reviews.llvm.org/D116177
[libc] Switch to use a macro which does not insert a section for every libc function.Summary:The new macro also inserts the C alias for the C++ implementationswithout needing an objcopy based pos
[libc] Switch to use a macro which does not insert a section for every libc function.Summary:The new macro also inserts the C alias for the C++ implementationswithout needing an objcopy based post processing step. The CMakerules have been updated to reflect this. More CMake cleanup can betaken up in future rounds and appropriate TODOs have been added for them.Reviewers: mcgrathr, sivachandraSubscribers:
[libc] Add fully-qualified target names.Only targets setup by the special LLVM libc rules now have fullyqualified names. The naming style is similar to fully qualified names inPython.Reviewers:
[libc] Add fully-qualified target names.Only targets setup by the special LLVM libc rules now have fullyqualified names. The naming style is similar to fully qualified names inPython.Reviewers: abrachet, PaulkaToast, phosekDifferential Revision: https://reviews.llvm.org/D77340
[libc][NFC] Make all top of file comments consistent.Summary:Made all header files consistent based of this documentation: https://llvm.org/docs/CodingStandards.html#file-headers.And did the same
[libc][NFC] Make all top of file comments consistent.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, abrachetReviewed By: sivachandra, abrachetSubscribers: MaskRay, tschuett, libc-commitsTags: #libc-projectDifferential Revision: https://reviews.llvm.org/D77533
[libc] Move the implementation of mmap and munmap into a linux specific area.This allows us to get rid of the PAGE_SIZE macro and use EXEC_PAGESIZEfrom linux/param.h.Few other points about this
[libc] Move the implementation of mmap and munmap into a linux specific area.This allows us to get rid of the PAGE_SIZE macro and use EXEC_PAGESIZEfrom linux/param.h.Few other points about this change:1. The linux syscall functions have been moved into a linux specific areainstead of src/unistd/syscall.h. The Linux syscall function from unistd.his a public vararg function. What we have currently are linux speciif internaloverloaded C++ functions. So, moving them to a Linux only area is moremeaningful.2. The implementations of mmap and munmap are now in a 'linux' directorywithin src/sys/mman. The idea here is that platform specificimplementations will live in a platform specific subdirectories like these.Infrastructure common to a platform will live in the platform's configdirectory. For example, the linux syscall implementations live inconfig/linux.Reviewers: abrachetTags: #libc-projectDifferential Revision: https://reviews.llvm.org/D73302
[libc] Replace the use of gtest with a new light weight unittest framework.Header files included wrongly using <...> are now included using theinternal path names as the new unittest framework all
[libc] Replace the use of gtest with a new light weight unittest framework.Header files included wrongly using <...> are now included using theinternal path names as the new unittest framework allows us to do so.Reviewers: phosek, abrachetDifferential Revision: https://reviews.llvm.org/D72743
[libc] Move all tests to a top level `test` directory.A toplevel target, `check-libc` has also been added.Reviewers: abrachet, phosekTags: #libc-projectDifferential Revision: https://reviews.
[libc] Move all tests to a top level `test` directory.A toplevel target, `check-libc` has also been added.Reviewers: abrachet, phosekTags: #libc-projectDifferential Revision: https://reviews.llvm.org/D72177
Add implementations of POSIX mmap and munmap functions.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 an
Add implementations of POSIX mmap and munmap functions.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 machineabstractions. A TODO note has been added at places where such abstractionswould help and make the arrangement scalable and cleaner. Addressing theTODOs and building such abstractions is not in the scope of this change.It is hoped that follow up changes cleaning up the problem areas andaddressing the TODOs will better illustrate the need for the changes.This change also does not try to imitate mmap and munmap implementationsof other libcs. The idea here is to put in the bare minimum required toobtain a working mmap and munmap, and then add the rest of thefunctionality on an as needed basis.Reviewers: abrachet, phosek, stanshebs, theravenSubscribers: mgorny, MaskRay, jfb, libc-commitsTags: #libc-projectDifferential Revision: https://reviews.llvm.org/D71634