5#include <QtCore/private/qglobal_p.h>
6#include <QtCore/qbasicatomic.h>
12# include <sys/syscall.h>
18#include <mach/mach_time.h>
27 if (!atom.loadRelaxed()) {
31 struct sigaction noaction = {};
32 noaction.sa_handler = SIG_IGN;
33 ::sigaction(SIGPIPE, &noaction,
nullptr);
42# define PATH_MAX 1024*1024
48 while (
len ==
buf.size()) {
56 buf.resize(
buf.size() * 2);
67#if defined(Q_PROCESSOR_X86_32) && defined(__GLIBC__)
68# if !__GLIBC_PREREQ(2, 22)
74int qt_open64(
const char *pathname,
int flags, mode_t
mode)
76 return syscall(SYS_open, pathname,
flags | O_LARGEFILE,
mode);
81#ifndef QT_BOOTSTRAPPED
83#if QT_CONFIG(poll_pollts)
90 using namespace std::chrono;
93 auto ms = ceil<milliseconds>(timespecToChrono<nanoseconds>(*ts));
94 return int(ms.count());
98int qt_poll(
struct pollfd *
fds, nfds_t nfds,
const struct timespec *timeout_ts);
100static inline int qt_ppoll(
struct pollfd *
fds, nfds_t nfds,
const struct timespec *timeout_ts)
102#if QT_CONFIG(poll_ppoll) || QT_CONFIG(poll_pollts)
103 return ::ppoll(
fds, nfds, timeout_ts,
nullptr);
104#elif QT_CONFIG(poll_poll)
106#elif QT_CONFIG(poll_select)
130 using namespace std::chrono;
136 if (
ret != -1 || errno != EINTR)
139 }
while (remaining > 0
ns);
constexpr bool isForever() const noexcept
Returns true if this QDeadlineTimer object never expires, false otherwise.
std::chrono::nanoseconds remainingTimeAsDuration() const noexcept
Returns the time remaining before the deadline.
EGLint EGLint EGLint EGLint int int int int * fds
Combined button and popup list for selecting options.
constexpr Initialization Uninitialized
#define Q_BASIC_ATOMIC_INITIALIZER(a)
int qt_safe_poll(struct pollfd *fds, nfds_t nfds, QDeadlineTimer deadline)
int qt_poll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts)
static int timespecToMillisecs(const struct timespec *ts)
QT_BEGIN_NAMESPACE void qt_ignore_sigpipe() noexcept
static int qt_ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts)
QByteArray qt_readlink(const char *path)
#define QT_EINTR_LOOP(var, cmd)
timespec durationToTimespec(std::chrono::nanoseconds timeout) noexcept
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei const GLchar *const * path
QDeadlineTimer deadline(30s)