QtBase  v6.3.1
Classes | Macros | Functions
qcore_unix_p.h File Reference
#include "qplatformdefs.h"
#include <QtCore/private/qglobal_p.h>
#include "qatomic.h"
#include "qbytearray.h"
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ipc.h>
#include <poll.h>
Include dependency graph for qcore_unix_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  qt_semun
 

Macros

#define EINTR_LOOP(var, cmd)
 
#define QT_OPEN   qt_safe_open
 
#define QT_READ   qt_safe_read
 
#define QT_WRITE   qt_safe_write
 
#define QT_CLOSE   qt_safe_close
 
#define _POSIX_MONOTONIC_CLOCK   -1
 

Functions

QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO (pollfd, Q_PRIMITIVE_TYPE)
 
constexpr timespec & normalizedTimespec (timespec &t)
 
constexpr bool operator< (const timespec &t1, const timespec &t2)
 
constexpr bool operator== (const timespec &t1, const timespec &t2)
 
constexpr bool operator!= (const timespec &t1, const timespec &t2)
 
constexpr timespec & operator+= (timespec &t1, const timespec &t2)
 
constexpr timespec operator+ (const timespec &t1, const timespec &t2)
 
constexpr timespec operator- (const timespec &t1, const timespec &t2)
 
constexpr timespec operator* (const timespec &t1, int mul)
 
timeval timespecToTimeval (const timespec &ts)
 
void qt_ignore_sigpipe ()
 
timespec qt_gettime () noexcept
 
void qt_nanosleep (timespec amount)
 
QByteArray qt_readlink (const char *path)
 
bool qt_haveLinuxProcfs ()
 
Q_CORE_EXPORT int qt_safe_poll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts)
 

Macro Definition Documentation

◆ _POSIX_MONOTONIC_CLOCK

#define _POSIX_MONOTONIC_CLOCK   -1

Definition at line 345 of file qcore_unix_p.h.

◆ EINTR_LOOP

#define EINTR_LOOP (   var,
  cmd 
)
Value:
do { \
var = cmd; \
} while (var == -1 && errno == EINTR)

Definition at line 98 of file qcore_unix_p.h.

◆ QT_CLOSE

#define QT_CLOSE   qt_safe_close

Definition at line 310 of file qcore_unix_p.h.

◆ QT_OPEN

#define QT_OPEN   qt_safe_open

Definition at line 204 of file qcore_unix_p.h.

◆ QT_READ

#define QT_READ   qt_safe_read

Definition at line 286 of file qcore_unix_p.h.

◆ QT_WRITE

#define QT_WRITE   qt_safe_write

Definition at line 295 of file qcore_unix_p.h.

Function Documentation

◆ normalizedTimespec()

constexpr timespec& normalizedTimespec ( timespec &  t)
inlineconstexpr

Definition at line 108 of file qcore_unix_p.h.

Here is the caller graph for this function:

◆ operator!=()

constexpr bool operator!= ( const timespec &  t1,
const timespec &  t2 
)
inlineconstexpr

Definition at line 124 of file qcore_unix_p.h.

Here is the caller graph for this function:

◆ operator*()

constexpr timespec operator* ( const timespec &  t1,
int  mul 
)
inlineconstexpr

Definition at line 146 of file qcore_unix_p.h.

Here is the call graph for this function:

◆ operator+()

constexpr timespec operator+ ( const timespec &  t1,
const timespec &  t2 
)
inlineconstexpr

Definition at line 132 of file qcore_unix_p.h.

Here is the call graph for this function:

◆ operator+=()

constexpr timespec& operator+= ( timespec &  t1,
const timespec &  t2 
)
inlineconstexpr

Definition at line 126 of file qcore_unix_p.h.

Here is the call graph for this function:

◆ operator-()

constexpr timespec operator- ( const timespec &  t1,
const timespec &  t2 
)
inlineconstexpr

Definition at line 139 of file qcore_unix_p.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<()

constexpr bool operator< ( const timespec &  t1,
const timespec &  t2 
)
inlineconstexpr

Definition at line 120 of file qcore_unix_p.h.

◆ operator==()

constexpr bool operator== ( const timespec &  t1,
const timespec &  t2 
)
inlineconstexpr

Definition at line 122 of file qcore_unix_p.h.

◆ Q_DECLARE_TYPEINFO()

QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO ( pollfd  ,
Q_PRIMITIVE_TYPE   
)

◆ qt_gettime()

timespec qt_gettime ( )
noexcept

Definition at line 90 of file qelapsedtimer_mac.cpp.

Here is the caller graph for this function:

◆ qt_haveLinuxProcfs()

bool qt_haveLinuxProcfs ( )
inline

Definition at line 354 of file qcore_unix_p.h.

Here is the caller graph for this function:

◆ qt_ignore_sigpipe()

void qt_ignore_sigpipe ( )
inline

Definition at line 162 of file qcore_unix_p.h.

Here is the call graph for this function:

◆ qt_nanosleep()

void qt_nanosleep ( timespec  amount)

Definition at line 101 of file qelapsedtimer_mac.cpp.

Here is the caller graph for this function:

◆ qt_readlink()

QByteArray qt_readlink ( const char *  path)

Definition at line 59 of file qcore_unix.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qt_safe_poll()

Q_CORE_EXPORT int qt_safe_poll ( struct pollfd *  fds,
nfds_t  nfds,
const struct timespec *  timeout_ts 
)

Definition at line 150 of file qcore_unix.cpp.

◆ timespecToTimeval()

timeval timespecToTimeval ( const timespec &  ts)
inline

Definition at line 153 of file qcore_unix_p.h.

Here is the caller graph for this function: