PadicoTM

Documentation

« back to PM2 home.
ps.c File Reference

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"
Include dependency graph for ps.c:

Go to the source code of this file.

Typedefs

typedef struct vlink_ps_specific_s * vobs_ps_t
 

Functions

static int vlink_ps_module_init (void)
 
static void padico_module_create_initializer__ParallelStreams (void)
 
static void vlink_ps_init (padico_vnode_t)
 
static int vlink_ps_create (padico_vnode_t)
 
static int vlink_ps_bind (padico_vnode_t)
 
static int vlink_ps_listen (padico_vnode_t)
 
static int vlink_ps_connect (padico_vnode_t)
 
static void vlink_ps_fullshutdown (padico_vnode_t)
 
static int vlink_ps_close (padico_vnode_t)
 
static void vlink_ps_send_post (padico_vnode_t)
 
static void vlink_ps_recv_post (padico_vnode_t)
 
 __attribute__ ((unused))
 get the seq part of a tagged ptr
 
static int vlink_ps_reader_worker (padico_vnode_t)
 
static int vlink_ps_callback_acceptor (int fd, void *key)
 
static void ps_tune_socket (int fd)
 
static void vlink_ps_genaddr (padico_vnode_t vnode)
 

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

Definition at line 74 of file ps.c.

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

Definition at line 74 of file ps.c.

◆ padico_module_create_initializer__ParallelStreams()

static void padico_module_create_initializer__ParallelStreams ( void  )
static

Definition at line 39 of file ps.c.

◆ ps_tune_socket()

static void ps_tune_socket ( int  fd)
static

◆ vlink_ps_bind()

◆ vlink_ps_callback_acceptor()

◆ vlink_ps_close()

static int vlink_ps_close ( padico_vnode_t  vnode)
static

Definition at line 254 of file ps.c.

References done, i, NULL, padico_sysio_close(), server_fd, and vnode.

◆ vlink_ps_connect()

◆ vlink_ps_create()

static int vlink_ps_create ( padico_vnode_t  vnode)
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 void vlink_ps_fullshutdown ( padico_vnode_t  vnode)
static

◆ vlink_ps_genaddr()

◆ vlink_ps_init()

static void vlink_ps_init ( padico_vnode_t  vnode)
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()

◆ vlink_ps_module_init()

static int vlink_ps_module_init ( void  )
static

◆ vlink_ps_reader_worker()

◆ vlink_ps_recv_post()

static void vlink_ps_recv_post ( padico_vnode_t  vnode)
static

Definition at line 307 of file ps.c.

References vlink_ps_reader_worker(), and vnode.

◆ vlink_ps_send_post()

Variable Documentation

◆ magic

const uint8_t magic[4] = {'P', 'S', '.', '2'}
static

◆ 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, } }

Definition at line 39 of file ps.c.

◆ padico_mod_funcs__ParallelStreams

const struct puk_mod_funcs_s padico_mod_funcs__ParallelStreams = { .init = ( vlink_ps_module_init ), .run = ( NULL ), .finalize = ( NULL ) }
static

Definition at line 39 of file ps.c.

◆ vlink_ps_component

puk_component_t vlink_ps_component = NULL
static

Definition at line 57 of file ps.c.

Referenced by vlink_ps_module_init().

◆ vlink_ps_driver

const struct padico_vlink_driver_s vlink_ps_driver
static
Initial value:
=
{
.create = &vlink_ps_create,
.bind = &vlink_ps_bind,
.listen = &vlink_ps_listen,
.connect = &vlink_ps_connect,
.fullshutdown = &vlink_ps_fullshutdown,
.close = &vlink_ps_close,
.send_post = &vlink_ps_send_post,
.recv_post = &vlink_ps_recv_post,
.dumpstat = NULL
}
return NULL
Definition Shm.h:88
static void vlink_ps_fullshutdown(padico_vnode_t)
Definition ps.c:234
static void vlink_ps_send_post(padico_vnode_t)
Definition ps.c:274
static int vlink_ps_listen(padico_vnode_t)
Definition ps.c:175
static int vlink_ps_create(padico_vnode_t)
Definition ps.c:117
static int vlink_ps_bind(padico_vnode_t)
Definition ps.c:139
static int vlink_ps_close(padico_vnode_t)
Definition ps.c:254
static int vlink_ps_connect(padico_vnode_t)
Definition ps.c:188
static void vlink_ps_recv_post(padico_vnode_t)
Definition ps.c:307

Definition at line 61 of file ps.c.

Referenced by vlink_ps_module_init().