Loading...
Searching...
No Matches
XrdSys Namespace Reference

## Namespaces

namespace | IOEvents

## Classes

class | KernelBuffer
class | RAtomic
class | RAtomic< bool >
class | RAtomic< T * >
struct | shm
struct | shm_error

## Functions

int | getIovMax ()
ssize_t | Move (char *&ubuff, KernelBuffer &kbuff, size_t length)
ssize_t | Move (KernelBuffer &kbuff, char *&ubuff)
ssize_t | Read (int fd, KernelBuffer &buffer, uint32_t length)
ssize_t | Read (int fd, KernelBuffer &buffer, uint32_t length, int64_t offset)
ssize_t | Send (int fd, KernelBuffer &buffer)
ssize_t | Write (int fd, KernelBuffer &buffer, int64_t offset)

## Variables

static const int | PageBits = 12
static const int | PageMask = 4095
static const int | PageSize = 4096

## Detailed Description

IOEvents

The classes here define a simple I/O event polling architecture suitable for use with non-blocking devices. As it implements an event model, it is not considered a high performance interface. For increased performance, you need to use multiple polling event loops which effectively implements a limited thread model for handling events. The implementation here is similar to libEvent with better handling of timeouts and I/O polling resumption.

While, channels are multi-thread safe, they cannot interlock with the state of their file descriptor. You must first disable (via SetFD()) or delete the channel before closing its associated file descriptor. This is the only safe way to keep channels and their file descriptors synchronized.

## Function Documentation

## getIovMax()

int XrdSys::getIovMax | ( |  | ) |

Returns
  : maximum size of I/O vector

Definition at line 77 of file XrdSysPlatform.cc.

{
#ifndef IOV_MAX
#ifdef _SC_IOV_MAX
static int IOV_MAX = []() {
int sc_iov_max = sysconf(_SC_IOV_MAX);
return sc_iov_max > 0 ? sc_iov_max : 1024;
}();
#else
#define IOV_MAX 1024
#endif
#endif
return IOV_MAX;
}
IOV_MAX
#define IOV_MAX

References IOV_MAX.

## Move() [1/2]

ssize_t XrdSys::Move | ( | char *& | ubuff,
|  | KernelBuffer & | kbuff,
|  | size_t | length )

inline

Utility function for moving a user space buffer to kernel space.

See also
  KernelBuffer::FromUser

Definition at line 462 of file XrdSysKernelBuffer.hh.

{
return kbuff.FromUser( ubuff, length );
}

## Move() [2/2]

ssize_t XrdSys::Move | ( | KernelBuffer & | kbuff,
|  | char *& | ubuff )

inline

Utility function for moving a kernel buffer to user space.

See also
  KernelBuffer::ToUser

Definition at line 452 of file XrdSysKernelBuffer.hh.

{
return kbuff.ToUser( ubuff );
}

Referenced by XrdCl::FileStateHandler::Write(), and XrdCl::XRootDMsgHandler::WriteMessageBody().

Here is the caller graph for this function:

## Read() [1/2]

ssize_t XrdSys::Read | ( | int | fd,
|  | KernelBuffer & | buffer,
|  | uint32_t | length )

inline

Utility function for reading data from a file descriptor into a kernel buffer.

See also
  KernelBuffer::ReadFromFD

Definition at line 421 of file XrdSysKernelBuffer.hh.

{
return buffer.ReadFromFD( fd, length, NULL );
}

## Read() [2/2]

ssize_t XrdSys::Read | ( | int | fd,
|  | KernelBuffer & | buffer,
|  | uint32_t | length,
|  | int64_t | offset )

inline

Utility function for reading data from a file descriptor into a kernel buffer.

See also
  KernelBuffer::ReadFromFD

Definition at line 410 of file XrdSysKernelBuffer.hh.

{
return buffer.ReadFromFD( fd, length, &offset );
}

Referenced by XrdCl::FileStateHandler::Write().

Here is the caller graph for this function:

## Send()

ssize_t XrdSys::Send | ( | int | fd,
|  | KernelBuffer & | buffer )

inline

Utility function for sending data from a kernel buffer into a socket.

See also
  KernelBuffer::WriteToFD

Definition at line 442 of file XrdSysKernelBuffer.hh.

{
return buffer.WriteToFD( fd, NULL );
}

Referenced by XrdCl::Socket::Send().

Here is the caller graph for this function:

## Write()

ssize_t XrdSys::Write | ( | int | fd,
|  | KernelBuffer & | buffer,
|  | int64_t | offset )

inline

Utility function for writing data from a kernel buffer into a file descriptor.

See also
  KernelBuffer::WriteToFD

Definition at line 432 of file XrdSysKernelBuffer.hh.

{
return buffer.WriteToFD( fd, &offset );
}

## Variable Documentation

## PageBits

const int XrdSys::PageBits = 12

static

Definition at line 38 of file XrdSysPageSize.hh.

## PageMask

const int XrdSys::PageMask = 4095

static

Definition at line 37 of file XrdSysPageSize.hh.

## PageSize

const int XrdSys::PageSize = 4096

static

Definition at line 36 of file XrdSysPageSize.hh.

Referenced by XrdOssCsiPages::apply_sequential_aligned_modify(), XrdOssCsiPages::BasicConsistencyCheck(), XrdOucCRC::Calc32C(), XrdOssCsiCrcUtils::crc32c_combine(), XrdOssCsiCrcUtils::crc32c_extendwith_zero(), XrdOssCsiCrcUtils::crc32c_split1(), XrdOssCsiCrcUtils::crc32c_split2(), XrdOssCsiPages::CRCMismatchError(), XrdOssCsiPages::FetchRange(), XrdOssCsiPages::FetchRangeAligned(), XrdOssCsiPages::FetchRangeUnaligned(), XrdOssCsiPages::FetchRangeUnaligned_postblock(), XrdOssCsiPages::FetchRangeUnaligned_preblock(), XrdCl::EcPgReadResponseHandler::HandleResponse(), XrdCl::PgReadSubstitutionHandler::HandleResponse(), XrdOssCsiPages::LockTrackinglen(), XrdOssCsiPages::PageReadError(), XrdOssCsiPages::pgDoCalc(), XrdCl::FileStateHandler::PgReadRetry(), XrdCl::FileStateHandler::PgWrite(), XrdOssCsiPages::pgWritePrelockCheck(), XrdOssCsiTagstoreFile::ResetSizes(), XrdOssCsiPages::StoreRange(), XrdOssCsiPages::StoreRangeAligned(), XrdOssCsiPages::StoreRangeUnaligned(), XrdOssCsiPages::StoreRangeUnaligned_postblock(), XrdOssCsiPages::StoreRangeUnaligned_preblock(), XrdOssCsi::tagOpenEnv(), XrdOssCsiTagstoreFile::Truncate(), XrdOssCsiPages::truncate(), XrdOssCsiPages::UpdateRange(), XrdOssCsiPages::UpdateRangeHoleUntilPage(), XrdOucCRC::Ver32C(), XrdOucCRC::Ver32C(), XrdOucCRC::Ver32C(), XrdOssCsiPages::VerifyRange(), and XrdCl::XRootDMsgHandler::WriteMessageBody().