Parallel Streams communication links. More...
#include <Padico/Puk.h>#include <Padico/Module.h>#include <Padico/VLink-internals.h>#include <assert.h>#include "ParallelStreams-internals.h"
Go to the source code of this file.
Typedefs | |
| typedef struct vlink_ps_specific_s * | vobs_ps_t |
Variables | |
| struct puk_mod_binary_s | padico_mod_binary__ParallelStreams = { .name = "ParallelStreams", .funcs = &padico_mod_funcs__ParallelStreams , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_0 , .n_deps = sizeof((char*[]){ 0, }) / sizeof(char*), .deps = { NULL, } } |
| static const struct puk_mod_funcs_s | padico_mod_funcs__ParallelStreams = { .init = ( vlink_ps_module_init ), .run = ( NULL ), .finalize = ( NULL ) } |
| static puk_component_t | vlink_ps_component = NULL |
| static const struct padico_vlink_driver_s | vlink_ps_driver |
| static const uint8_t | magic [4] = {'P', 'S', '.', '2'} |
Detailed Description
Parallel Streams communication links.
Definition in file ps.c.
Typedef Documentation
◆ vobs_ps_t
Function Documentation
◆ __attribute__()
| __attribute__ | ( | (unused) | ) |
get the seq part of a tagged ptr
get the allocated queue size
hint about the number of elements in queue .
hint whether the queue is empty.
- Do not rely on it: state may have changed before dequeue * Usefull to reduce active polling, though
Do not rely on it: state may have changed before function return.
get the seq part of a tagged ptr
pop key & data of any element in the table
remove entry with given key from hashtable; does nothing if key not found
allocate a new hashtable
trigger progressive rehashing
flush all rows of a pending rehash
lookup an entry in the hashtable
insert an entry in the given table, without rehashing
make progress on rehash for n rows
force rehashing of given row
get the seq part of a tagged ptr
get the seq part of a tagged ptr
pop key & data of any element in the table
remove entry with given key from hashtable; does nothing if key not found
allocate a new hashtable
make progress on rehash for n rows
force rehashing of given row
lookup in the oldtable; if found, migrate row and return cell in regular table
default compile-time thread level
◆ padico_module_create_initializer__ParallelStreams()
◆ ps_tune_socket()
Definition at line 312 of file ps.c.
References done, fd, PUK_ABI_FSYS_REAL, puk_spinlock_acquire(), and puk_spinlock_release().
Referenced by vlink_ps_callback_acceptor(), and vlink_ps_connect().
◆ vlink_ps_bind()
|
static |
Definition at line 139 of file ps.c.
References vobs_attr_binding_s::autobind, padico_vnode_s::binding, done, vobs_attr_binding_s::primary, vobs_attr_binding_s::primary_len, PUK_ABI_FSYS_REAL, puk_abi_real_errno, puk_spinlock_acquire(), puk_spinlock_release(), rc, server_fd, vlink_ps_genaddr(), vnode, and vnode_set_error().
Referenced by vlink_ps_connect().
◆ vlink_ps_callback_acceptor()
Definition at line 330 of file ps.c.
References assert(), done, fd, i, key, magic, NULL, ps_connection_header_s::num_way, padico_sysio_accept(), padico_sysio_errno(), padico_sysio_in(), padico_vnode_component_acceptor(), padico_vsock_acceptor_finalize(), padico_vsock_init(), ps_connection_header_s::ps_magic, ps_tune_socket(), server_fd, socklen_t, vlink_ps_genaddr(), vlink_ps_init(), vnode, vnode_lock(), vnode_set_error(), and vnode_unlock().
Referenced by vlink_ps_listen().
◆ vlink_ps_close()
|
static |
◆ vlink_ps_connect()
|
static |
Definition at line 188 of file ps.c.
References vobs_attr_binding_s::autobind, padico_vnode_s::binding, done, i, magic, ps_connection_header_s::num_way, padico_sysio_out(), padico_sysio_socket(), padico_vsock_connector_finalize(), ps_connection_header_s::ps_magic, ps_tune_socket(), PUK_ABI_FSYS_REAL, puk_abi_real_errno, puk_spinlock_acquire(), puk_spinlock_release(), rc, padico_vnode_s::remote, vobs_attr_remote_s::remote_addr, vobs_attr_remote_s::remote_addrlen, vlink_ps_bind(), vnode, and vnode_set_error().
◆ vlink_ps_create()
|
static |
Definition at line 117 of file ps.c.
References done, fd, padico_sysio_socket(), puk_abi_real_errno, vlink_ps_init(), and vnode.
◆ vlink_ps_fullshutdown()
|
static |
Definition at line 234 of file ps.c.
References done, i, NULL, PUK_ABI_FSYS_REAL, puk_spinlock_acquire(), puk_spinlock_release(), server_fd, shutdown, and vnode.
◆ vlink_ps_genaddr()
|
static |
Definition at line 130 of file ps.c.
References padico_vnode_s::binding, done, padico_topo_getlocalhost, padico_topo_host_getaddr(), vobs_attr_binding_s::primary, vobs_attr_binding_s::primary_len, and vnode.
Referenced by vlink_ps_bind(), and vlink_ps_callback_acceptor().
◆ vlink_ps_init()
|
static |
Definition at line 98 of file ps.c.
References done, NULL, padico_vnode_get_context(), and vnode.
Referenced by vlink_ps_callback_acceptor(), and vlink_ps_create().
◆ vlink_ps_listen()
|
static |
< the fildes is readable
Definition at line 175 of file ps.c.
References vobs_attr_listener_s::backlog_size, done, padico_vnode_s::listener, padico_io_activate(), PADICO_IO_EVENT_READ, padico_io_register(), PUK_ABI_FSYS_REAL, puk_spinlock_acquire(), puk_spinlock_release(), rc, server_fd, vlink_ps_callback_acceptor(), and vnode.
◆ vlink_ps_module_init()
Definition at line 84 of file ps.c.
References done, padico_vnode_component_driver, PS_DEFAULT_BLOCK_SIZE, PS_DEFAULT_NUM_WAYS, vlink_ps_component, and vlink_ps_driver.
◆ vlink_ps_reader_worker()
|
static |
Definition at line 382 of file ps.c.
References done, vobs_attr_status_s::end_of_file, padico_sysio_errno(), padico_sysio_read(), padico_vnode_s::rbox, rc, vobs_attr_rbox_s::read_buffer, vobs_attr_rbox_s::read_done, vobs_attr_rbox_s::read_posted, recv, padico_vnode_s::status, vnode, vobs_attr_rbox, and vobs_signal().
Referenced by vlink_ps_recv_post().
◆ vlink_ps_recv_post()
|
static |
Definition at line 307 of file ps.c.
References vlink_ps_reader_worker(), and vnode.
◆ vlink_ps_send_post()
|
static |
Definition at line 274 of file ps.c.
References __attribute__, assert(), done, padico_sysio_out(), ptr, rc, send, size, vnode, vobs_attr_wbox, vobs_signal(), padico_vnode_s::wbox, vobs_attr_wbox_s::write_buffer, vobs_attr_wbox_s::write_done, and vobs_attr_wbox_s::write_posted.
Variable Documentation
◆ magic
Definition at line 80 of file ps.c.
Referenced by padico_sockaddr_check(), padico_sockaddr_init(), vlink_ps_callback_acceptor(), and vlink_ps_connect().
◆ padico_mod_binary__ParallelStreams
| struct puk_mod_binary_s padico_mod_binary__ParallelStreams = { .name = "ParallelStreams", .funcs = &padico_mod_funcs__ParallelStreams , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_0 , .n_deps = sizeof((char*[]){ 0, }) / sizeof(char*), .deps = { NULL, } } |
◆ padico_mod_funcs__ParallelStreams
|
static |
◆ vlink_ps_component
|
static |
Definition at line 57 of file ps.c.
Referenced by vlink_ps_module_init().
◆ vlink_ps_driver
|
static |
Definition at line 61 of file ps.c.
Referenced by vlink_ps_module_init().