kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Functions
syscall.c File Reference
#include "syscall.h"
#include <unistd.h>
#include <fcntl.h>
#include <pthread.h>

Go to the source code of this file.

Functions

int syscall_poll (struct pollfd fds[], nfds_t nfds, int timeout)
 Wrappers for syscalls, to allow mocking for testing. More...
 
int syscall_close (int fd)
 
ssize_t syscall_write (int fildes, const void *buf, size_t nbyte)
 
ssize_t syscall_read (int fildes, void *buf, size_t nbyte)
 
int syscall_SSL_write (SSL *ssl, const void *buf, int num)
 Wrappers for OpenSSL calls. More...
 
int syscall_SSL_read (SSL *ssl, void *buf, int num)
 
int syscall_SSL_get_error (const SSL *ssl, int ret)
 
int syscall_timestamp (struct timeval *restrict tv, bool relative)
 Wrapper for gettimeofday and (where available) clock_gettime(CLOCK_MONOTONIC), which is used when RELATIVE is true. More...
 
int syscall_pthread_join (pthread_t thread, void **value_ptr)
 Wrapper for pthread calls. More...
 

Function Documentation

int syscall_poll ( struct pollfd  fds[],
nfds_t  nfds,
int  timeout 
)

Wrappers for syscalls, to allow mocking for testing.

Definition at line 27 of file syscall.c.

int syscall_close ( int  fd)

Definition at line 31 of file syscall.c.

ssize_t syscall_write ( int  fildes,
const void *  buf,
size_t  nbyte 
)

Definition at line 35 of file syscall.c.

ssize_t syscall_read ( int  fildes,
void *  buf,
size_t  nbyte 
)

Definition at line 39 of file syscall.c.

int syscall_SSL_write ( SSL *  ssl,
const void *  buf,
int  num 
)

Wrappers for OpenSSL calls.

Definition at line 44 of file syscall.c.

int syscall_SSL_read ( SSL *  ssl,
void *  buf,
int  num 
)

Definition at line 48 of file syscall.c.

int syscall_SSL_get_error ( const SSL *  ssl,
int  ret 
)

Definition at line 52 of file syscall.c.

int syscall_timestamp ( struct timeval *restrict  tp,
bool  relative 
)

Wrapper for gettimeofday and (where available) clock_gettime(CLOCK_MONOTONIC), which is used when RELATIVE is true.

Definition at line 60 of file syscall.c.

int syscall_pthread_join ( pthread_t  thread,
void **  value_ptr 
)

Wrapper for pthread calls.

Definition at line 77 of file syscall.c.