MCPcopy Create free account
hub / github.com/boostorg/filesystem / statx_syscall

Function statx_syscall

src/operations.cpp:397–412  ·  view source on GitHub ↗

A wrapper for the statx syscall. Disable MSAN since at least on clang 10 it doesn't know which fields of struct statx are initialized by the syscall and misdetects errors.

Source from the content-addressed store, hash-verified

395//! A wrapper for the statx syscall. Disable MSAN since at least on clang 10 it doesn't
396//! know which fields of struct statx are initialized by the syscall and misdetects errors.
397BOOST_FILESYSTEM_NO_SANITIZE_MEMORY
398int statx_syscall(int dirfd, const char* path, int flags, unsigned int mask, struct ::statx* stx)
399{
400 int res = ::syscall(__NR_statx, dirfd, path, flags, mask, stx);
401 if (res < 0)
402 {
403 const int err = errno;
404 if (BOOST_UNLIKELY(err == ENOSYS))
405 {
406 filesystem::detail::atomic_store_relaxed(statx_ptr, &statx_fstatat);
407 return statx_fstatat(dirfd, path, flags, mask, stx);
408 }
409 }
410
411 return res;
412}
413
414#endif // defined(BOOST_FILESYSTEM_HAS_STATX)
415

Callers

nothing calls this directly

Calls 2

atomic_store_relaxedFunction · 0.85
statx_fstatatFunction · 0.85

Tested by

no test coverage detected