Seastar
High performance C++ framework for concurrent servers
Classes | Namespaces | Typedefs | Functions
posix.hh File Reference
#include <seastar/core/sstring.hh>
#include "abort_on_ebadf.hh"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <assert.h>
#include <utility>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/eventfd.h>
#include <sys/timerfd.h>
#include <sys/socket.h>
#include <sys/epoll.h>
#include <sys/mman.h>
#include <signal.h>
#include <system_error>
#include <pthread.h>
#include <memory>
#include <chrono>
#include <sys/uio.h>
#include <seastar/net/socket_defs.hh>
#include <seastar/util/std-compat.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

 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)
 
mmap_area seastar::mmap_anonymous (void *addr, size_t length, int prot, int flags)
 
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)
 
template<typename T >
void seastar::throw_pthread_error (T r)
 
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)
 

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