Seastar
High performance C++ framework for concurrent servers
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Namespaces | Typedefs | Functions | Variables
posix.hh File Reference
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/timerfd.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <assert.h>
#include <fcntl.h>
#include <pthread.h>
#include <signal.h>
#include <spawn.h>
#include <unistd.h>
#include <utility>
#include <system_error>
#include <chrono>
#include <cstring>
#include <functional>
#include <memory>
#include <set>
#include <optional>
#include "abort_on_ebadf.hh"
#include <seastar/core/sstring.hh>
#include <seastar/net/socket_defs.hh>
#include <seastar/util/std-compat.hh>
#include <seastar/util/modules.hh>

Go to the source code of this file.

Classes

struct  seastar::mmap_deleter
 
class  seastar::file_desc
 
class  seastar::posix_thread
 
class  seastar::posix_thread::attr
 
struct  seastar::posix_thread::attr::stack_size
 

Namespaces

namespace  seastar
 Seastar API namespace.
 

Typedefs

using seastar::mmap_area = std::unique_ptr< char[], mmap_deleter >
 

Functions

void seastar::throw_system_error_on (bool condition, const char *what_arg="")
 
template<typename T >
void seastar::throw_kernel_error (T r)
 
template<typename T >
void seastar::throw_pthread_error (T r)
 
mmap_area seastar::mmap_anonymous (void *addr, size_t length, int prot, int flags)
 
constexpr unsigned seastar::posix::shutdown_mask (int how)
 
template<typename Rep , typename Period >
struct timespec seastar::posix::to_timespec (std::chrono::duration< Rep, Period > d)
 
template<typename Rep1 , typename Period1 , typename Rep2 , typename Period2 >
struct itimerspec seastar::posix::to_relative_itimerspec (std::chrono::duration< Rep1, Period1 > base, std::chrono::duration< Rep2, Period2 > interval)
 
template<typename Clock , class Duration , class Rep , class Period >
struct itimerspec seastar::posix::to_absolute_itimerspec (std::chrono::time_point< Clock, Duration > base, std::chrono::duration< Rep, Period > interval)
 
sigset_t seastar::make_sigset_mask (int signo)
 
sigset_t seastar::make_full_sigset_mask ()
 
sigset_t seastar::make_empty_sigset_mask ()
 
void seastar::pin_this_thread (unsigned cpu_id)
 
std::set< unsigned > seastar::get_current_cpuset ()
 

Variables

constexpr unsigned seastar::posix::rcv_shutdown = 0x1
 
constexpr unsigned seastar::posix::snd_shutdown = 0x2
 

Class Documentation

◆ seastar::posix_thread::attr::stack_size

struct seastar::posix_thread::attr::stack_size
Class Members
size_t size

Function Documentation

◆ to_absolute_itimerspec()

template<typename Clock , class Duration , class Rep , class Period >
struct itimerspec seastar::posix::to_absolute_itimerspec ( std::chrono::time_point< Clock, Duration >  base,
std::chrono::duration< Rep, Period >  interval 
)

Converts a time_point and a duration to an itimerspec

Parameters
basebase time for the timer; must use the same clock as the timer
intervalperiod for re-arming the timer
Returns
base and interval converted to an itimerspec

◆ to_relative_itimerspec()

template<typename Rep1 , typename Period1 , typename Rep2 , typename Period2 >
struct itimerspec seastar::posix::to_relative_itimerspec ( std::chrono::duration< Rep1, Period1 >  base,
std::chrono::duration< Rep2, Period2 >  interval 
)

Converts a relative start time and an interval to an itimerspec

Parameters
baseFirst expiration of the timer, relative to the current time
intervalperiod for re-arming the timer
Returns
base and interval converted to an itimerspec

◆ to_timespec()

template<typename Rep , typename Period >
struct timespec seastar::posix::to_timespec ( std::chrono::duration< Rep, Period >  d)

Converts a duration value to a timespec

Parameters
da duration value to convert to the POSIX timespec format
Returns
d as a timespec value