[libc-commits] [PATCH] D130662: [libc] Read and write errno via special getter and setter functions.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jul 27 13:14:17 PDT 2022


sivachandra created this revision.
sivachandra added reviewers: abrachet, mcgrathr, michaelrj, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added projects: libc-project, All.
sivachandra requested review of this revision.

When built for tests, the setter and getter functions use an errno which
is different from the global, system libc errno. This way, the tests stay
hermetic with respect to the setting and testing of errno - there is no
mixup with the system libc's errno, even accidentally.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130662

Files:
  libc/src/errno/CMakeLists.txt
  libc/src/errno/errno.cpp
  libc/src/errno/llvmlibc_errno.h
  libc/src/fcntl/linux/openat.cpp
  libc/src/sys/mman/linux/mmap.cpp
  libc/src/sys/mman/linux/munmap.cpp
  libc/src/sys/stat/linux/mkdir.cpp
  libc/src/sys/stat/linux/mkdirat.cpp
  libc/src/time/time_utils.h
  libc/src/unistd/linux/lseek.cpp
  libc/src/unistd/linux/read.cpp
  libc/src/unistd/linux/rmdir.cpp
  libc/src/unistd/linux/unlink.cpp
  libc/src/unistd/linux/unlinkat.cpp
  libc/src/unistd/linux/write.cpp
  libc/test/ErrnoSetterMatcher.h
  libc/test/integration/loader/linux/tls_test.cpp
  libc/test/src/errno/errno_test.cpp
  libc/test/src/time/asctime_r_test.cpp
  libc/test/src/time/asctime_test.cpp
  libc/test/src/time/gmtime_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130662.448142.patch
Type: text/x-patch
Size: 15562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220727/4d9e26d9/attachment-0001.bin>


More information about the libc-commits mailing list