![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include "qplatformdefs.h"#include <QtCore/private/qglobal_p.h>#include "qbytearray.h"#include "qdeadlinetimer.h"#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <sys/select.h>#include <sys/time.h>#include <chrono>#include <sys/wait.h>#include <errno.h>#include <fcntl.h>#include <poll.h>Go to the source code of this file.
Classes | |
| union | qt_semun |
Macros | |
| #define | QT_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) |
| timespec | durationToTimespec (std::chrono::nanoseconds timeout) noexcept |
| template<typename Duration> | |
| Duration | timespecToChrono (timespec ts) noexcept |
| std::chrono::milliseconds | timespecToChronoMs (timespec ts) noexcept |
| 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 (timespec ts) |
| timespec & | operator+= (timespec &t1, std::chrono::milliseconds msecs) |
| timespec & | operator+= (timespec &t1, int ms) |
| timespec | operator+ (const timespec &t1, std::chrono::milliseconds msecs) |
| timespec | operator+ (const timespec &t1, int ms) |
| timespec | qAbsTimespec (timespec ts) |
| template<clockid_t ClockId = SteadyClockClockId> | |
| timespec | deadlineToAbstime (QDeadlineTimer deadline) |
| Q_CORE_EXPORT void | qt_ignore_sigpipe () noexcept |
| static int | qt_safe_open (const char *pathname, int flags, mode_t mode=0777) |
| static int | qt_safe_pipe (int pipefd[2], int flags=0) |
| static int | qt_safe_dup (int oldfd, int atleast=0, int flags=FD_CLOEXEC) |
| static int | qt_safe_dup2 (int oldfd, int newfd, int flags=FD_CLOEXEC) |
| static qint64 | qt_safe_read (int fd, void *data, qint64 maxlen) |
| static qint64 | qt_safe_write (int fd, const void *data, qint64 len) |
| static qint64 | qt_safe_write_nosignal (int fd, const void *data, qint64 len) |
| static int | qt_safe_close (int fd) |
| QByteArray | qt_readlink (const char *path) |
| bool | qt_haveLinuxProcfs () |
| Q_CORE_EXPORT int | qt_safe_poll (struct pollfd *fds, nfds_t nfds, QDeadlineTimer deadline) |
| static struct pollfd | qt_make_pollfd (int fd, short events) |
Variables | |
| static constexpr clockid_t | SteadyClockClockId |
| static constexpr clockid_t | QWaitConditionClockId |
| static constexpr auto | OneSecAsNsecs = std::chrono::nanoseconds(std::chrono::seconds{ 1 }).count() |
| #define _POSIX_MONOTONIC_CLOCK -1 |
Definition at line 410 of file qcore_unix_p.h.
| #define QT_CLOSE qt_safe_close |
Definition at line 375 of file qcore_unix_p.h.
| #define QT_EINTR_LOOP | ( | var, | |
| cmd ) |
Definition at line 60 of file qcore_unix_p.h.
| #define QT_OPEN qt_safe_open |
Definition at line 272 of file qcore_unix_p.h.
| #define QT_READ qt_safe_read |
Definition at line 351 of file qcore_unix_p.h.
| #define QT_WRITE qt_safe_write |
Definition at line 360 of file qcore_unix_p.h.
|
inline |
Definition at line 223 of file qcore_unix_p.h.
|
inlinenoexcept |
Definition at line 109 of file qcore_unix_p.h.
|
inlineconstexpr |
Definition at line 133 of file qcore_unix_p.h.
Referenced by operator*(), operator+(), operator+=(), operator-(), and qAbsTimespec().
|
inlineconstexpr |
Definition at line 149 of file qcore_unix_p.h.
References operator==().
|
inlineconstexpr |
Definition at line 171 of file qcore_unix_p.h.
References normalizedTimespec().
|
inlineconstexpr |
Definition at line 157 of file qcore_unix_p.h.
References normalizedTimespec().
|
inline |
Definition at line 205 of file qcore_unix_p.h.
|
inline |
Definition at line 198 of file qcore_unix_p.h.
|
inlineconstexpr |
Definition at line 151 of file qcore_unix_p.h.
References normalizedTimespec().
|
inline |
Definition at line 192 of file qcore_unix_p.h.
|
inline |
Definition at line 186 of file qcore_unix_p.h.
|
inlineconstexpr |
Definition at line 164 of file qcore_unix_p.h.
References normalizedTimespec().
|
inlineconstexpr |
Definition at line 145 of file qcore_unix_p.h.
|
inlineconstexpr |
Definition at line 147 of file qcore_unix_p.h.
Referenced by operator!=().
| QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO | ( | pollfd | , |
| Q_PRIMITIVE_TYPE | ) |
|
inline |
Definition at line 210 of file qcore_unix_p.h.
References normalizedTimespec().
|
inline |
Definition at line 416 of file qcore_unix_p.h.
|
noexcept |
Definition at line 24 of file qcore_unix.cpp.
|
inlinestatic |
Definition at line 432 of file qcore_unix_p.h.
| QByteArray qt_readlink | ( | const char * | path | ) |
Definition at line 39 of file qcore_unix.cpp.
|
inlinestatic |
Definition at line 368 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 303 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 324 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 256 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 276 of file qcore_unix_p.h.
| Q_CORE_EXPORT int qt_safe_poll | ( | struct pollfd * | fds, |
| nfds_t | nfds, | ||
| QDeadlineTimer | deadline ) |
Behaves as close to POSIX poll(2) as practical but may be implemented using select(2) where necessary. In that case, returns -1 and sets errno to EINVAL if passed any descriptor greater than or equal to FD_SETSIZE.
Definition at line 122 of file qcore_unix.cpp.
References qt_ppoll().
Definition at line 344 of file qcore_unix_p.h.
Definition at line 353 of file qcore_unix_p.h.
Definition at line 362 of file qcore_unix_p.h.
|
inlinenoexcept |
Definition at line 121 of file qcore_unix_p.h.
|
inlinenoexcept |
Definition at line 127 of file qcore_unix_p.h.
|
inline |
Definition at line 178 of file qcore_unix_p.h.
Referenced by qt_poll().
|
staticconstexpr |
Definition at line 107 of file qcore_unix_p.h.
|
inlinestaticconstexpr |
Definition at line 92 of file qcore_unix_p.h.
|
inlinestaticconstexpr |
Definition at line 69 of file qcore_unix_p.h.