![]() |
kinetic-c
v0.12.0
Seagate Kinetic Protocol Client Library for C
|
#include "listener_helper.h"
#include "listener_task.h"
#include "syscall.h"
#include "atomic.h"
#include <assert.h>
Go to the source code of this file.
Functions | |
listener_msg * | ListenerHelper_GetFreeMsg (listener *l) |
Get a free message from the listener's message pool. More... | |
bool | ListenerHelper_PushMessage (struct listener *l, listener_msg *msg, int *reply_fd) |
Push a message into the listener's message queue. More... | |
rx_info_t * | ListenerHelper_GetFreeRXInfo (struct listener *l) |
Get a free RX_INFO record, if any are available. More... | |
rx_info_t * | ListenerHelper_FindInfoBySequenceID (listener *l, int fd, int64_t seq_id) |
Try to find an RX_INFO record by a <file descriptor, sequence_id> pair. More... | |
listener_msg* ListenerHelper_GetFreeMsg | ( | listener * | l | ) |
Get a free message from the listener's message pool.
Definition at line 31 of file listener_helper.c.
References ATOMIC_BOOL_COMPARE_AND_SWAP, listener::bus, BUS_ASSERT, BUS_LOG, BUS_LOG_SNPRINTF, listener_msg::id, LOG_LISTENER, MAX_QUEUE_MESSAGES, listener::msg_freelist, MSG_NONE, listener::msgs_in_use, listener_msg::next, listener_msg::type, listener_msg::u, and bus::udata.
bool ListenerHelper_PushMessage | ( | struct listener * | l, |
listener_msg * | msg, | ||
int * | reply_fd | ||
) |
Push a message into the listener's message queue.
Definition at line 70 of file listener_helper.c.
References listener::bus, BUS_ASSERT, BUS_LOG_SNPRINTF, listener::commit_pipe, listener_msg::id, ListenerTask_ReleaseMsg(), LOG_LISTENER, listener_msg::pipes, syscall_write(), and bus::udata.
Get a free RX_INFO record, if any are available.
Definition at line 100 of file listener_helper.c.
References listener::bus, BUS_ASSERT, BUS_LOG, BUS_LOG_SNPRINTF, rx_info_t::id, LOG_LISTENER, LOG_SENDER, MAX_PENDING_MESSAGES, rx_info_t::next, RIS_INACTIVE, listener::rx_info, listener::rx_info_freelist, listener::rx_info_in_use, listener::rx_info_max_used, rx_info_t::state, and bus::udata.
Try to find an RX_INFO record by a <file descriptor, sequence_id> pair.
Definition at line 127 of file listener_helper.c.
References listener::bus, BUS_ASSERT, BUS_LOG_SNPRINTF, rx_info_t::expect, boxed_msg::fd, rx_info_t::hold, rx_info_t::id, ListenerTask_DumpRXInfoTable(), bus::log_level, LOG_LISTENER, LOG_MEMORY, boxed_msg::out_seq_id, RIS_EXPECT, RIS_HOLD, RIS_INACTIVE, listener::rx_info, listener::rx_info_max_used, rx_info_t::state, rx_info_t::u, and bus::udata.