kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Functions
bus_inward.h File Reference
#include "bus_types.h"

Go to the source code of this file.

Functions

const char * Bus_LogEventStr (log_event_t event)
 Get the string key for a log event ID. More...
 
struct listenerBus_GetListenerForSocket (struct bus *b, int fd)
 For a given file descriptor, get the listener ID to use. More...
 
bool Bus_ProcessBoxedMessage (struct bus *b, struct boxed_msg *box, size_t *backpressure)
 Deliver a boxed message to the thread pool to execute. More...
 
void Bus_BackpressureDelay (struct bus *b, size_t backpressure, uint8_t shift)
 Provide backpressure by sleeping for (backpressure >> shift) msec, if the value is greater than 0. More...
 

Function Documentation

const char* Bus_LogEventStr ( log_event_t  event)

Get the string key for a log event ID.

Definition at line 335 of file bus.c.

References LOG_INITIALIZATION, LOG_LISTENER, LOG_MEMORY, LOG_NEW_CLIENT, LOG_SENDER, LOG_SENDING_REQUEST, LOG_SHUTDOWN, and LOG_SOCKET_REGISTERED.

struct listener* Bus_GetListenerForSocket ( struct bus b,
int  fd 
)

For a given file descriptor, get the listener ID to use.

This will level sockets between multiple threads.

Definition at line 330 of file bus.c.

References listener_id_of_socket(), and bus::listeners.

bool Bus_ProcessBoxedMessage ( struct bus b,
struct boxed_msg box,
size_t *  backpressure 
)
void Bus_BackpressureDelay ( struct bus b,
size_t  backpressure,
uint8_t  shift 
)

Provide backpressure by sleeping for (backpressure >> shift) msec, if the value is greater than 0.

Definition at line 551 of file bus.c.

References BUS_LOG_SNPRINTF, LOG_SENDER, syscall_poll(), and bus::udata.