![]() |
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_WEAK_SYMBOL(fn) |
| #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 timeouttimeout) noexcept |
| template<typename Duration> | |
| Duration | timespecToChrono (timespec ts) noexcept |
| constexpr timespec & | normalizedTimespec (timespec &tt) |
| timeval | timespecToTimeval (timespec ts) |
| template<clockid_t ClockId = QSteadyClockClockId> | |
| timespec | deadlineToAbstime (QDeadlineTimer deadline) |
| Q_CORE_EXPORT void | qt_ignore_sigpipe () noexcept |
| static int | qt_safe_open (const char *pathname, int flagsflags, mode_t modemode=0777) |
| static int | qt_safe_pipe (int pipefd[2], int flagsflags=0) |
| static int | qt_safe_dup (int oldfd, int atleast=0, int flagsflags=FD_CLOEXEC) |
| static int | qt_safe_dup2 (int oldfd, int newfd, int flagsflags=FD_CLOEXEC) |
| static qint64 | qt_safe_read (int fdfd, void *datadata, qint64 maxlen) |
| static qint64 | qt_safe_write (int fdfd, const void *datadata, qint64 lenlen) |
| static qint64 | qt_safe_write_nosignal (int fdfd, const void *datadata, qint64 lenlen) |
| static int | qt_safe_close (int fdfd) |
| QByteArray | qt_readlink (const char *pathpath) |
| bool | qt_haveLinuxProcfs () |
| Q_CORE_EXPORT int | qt_safe_poll (struct pollfd *fdsfds, nfds_t nfds, QDeadlineTimer deadline) |
| static struct pollfd | qt_make_pollfd (int fdfd, short events) |
Variables | |
| static constexpr clockid_t | QSteadyClockClockId |
| 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 359 of file qcore_unix_p.h.
| #define QT_CLOSE qt_safe_close |
Definition at line 324 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 217 of file qcore_unix_p.h.
| #define QT_READ qt_safe_read |
Definition at line 300 of file qcore_unix_p.h.
| #define QT_WEAK_SYMBOL | ( | fn | ) |
Definition at line 73 of file qcore_unix_p.h.
| #define QT_WRITE qt_safe_write |
Definition at line 309 of file qcore_unix_p.h.
|
inline |
Definition at line 168 of file qcore_unix_p.h.
|
inlinenoexcept |
Definition at line 127 of file qcore_unix_p.h.
|
inlineconstexpr |
Definition at line 146 of file qcore_unix_p.h.
| QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO | ( | pollfd | , |
| Q_PRIMITIVE_TYPE | ) |
|
inline |
Definition at line 365 of file qcore_unix_p.h.
|
noexcept |
Definition at line 24 of file qcore_unix.cpp.
|
inlinestatic |
Definition at line 381 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 317 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 250 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 271 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 201 of file qcore_unix_p.h.
|
inlinestatic |
Definition at line 221 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 293 of file qcore_unix_p.h.
Definition at line 302 of file qcore_unix_p.h.
Definition at line 311 of file qcore_unix_p.h.
|
inlinenoexcept |
Definition at line 139 of file qcore_unix_p.h.
|
inline |
Definition at line 159 of file qcore_unix_p.h.
Referenced by qt_poll().
|
staticconstexpr |
Definition at line 125 of file qcore_unix_p.h.
|
inlinestaticconstexpr |
Definition at line 85 of file qcore_unix_p.h.
|
inlinestaticconstexpr |
Definition at line 110 of file qcore_unix_p.h.