#include "bench_common.h"#include <Padico/PSP.h>#include <Padico/NetSelector.h>#include <Padico/PadicoTM.h>#include <Padico/Module.h>
Go to the source code of this file.
Functions | |
| int | bench_psp_init (void) |
| int | bench_psp_run (int argc, char **argv) |
| static void | padico_module_create_initializer__bench_PSP (void) |
| static void | my_memcpy (void *_dest, const void *_source, size_t len) |
| static void | bench_psp_post_recv (char *buffer, size_t lenbuf) |
| static void | bench_psp_wait (void) |
| static void | bench_psp_send (void *buffer, size_t lenbuf) |
| static void | bench_psp_handler (const void *_header, padico_topo_node_t from, void *key, padico_psp_pump_t pump, void *token) |
| static void | psp_server (char *buffer, size_t lenbuf) |
| static void | psp_client (char *buffer, size_t lenbuf) |
Variables | |
| struct puk_mod_binary_s | padico_mod_binary__bench_PSP = { .name = "bench_PSP", .funcs = &padico_mod_funcs__bench_PSP , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_PSP , .n_deps = sizeof((char*[]){ 0, }) / sizeof(char*), .deps = { NULL, } } |
| static const struct puk_mod_funcs_s | padico_mod_funcs__bench_PSP = { .init = ( bench_psp_init ), .run = ( bench_psp_run ), .finalize = ( NULL ) } |
| static char * | recv_buffer = NULL |
| buffer for receipt | |
| static size_t | recv_lenbuf = 0 |
| len of above buffer | |
| static size_t | len_offset = 0 |
| static pthread_t | recv_tid |
| static int | num_trips = 0 |
| number of messages received | |
| static pthread_mutex_t | mutex |
| static pthread_cond_t | cond |
| static padico_topo_node_t | peer |
| static struct puk_receptacle_PadicoSimplePackets_s | psp |
| static const struct bench_desc_s | psp_bench |
Function Documentation
◆ bench_psp_handler()
|
static |
Definition at line 94 of file bench_PSP.c.
References cond, header, len, len_offset, mutex, NULL, num_trips, recv_buffer, recv_lenbuf, recv_tid, and tid.
Referenced by bench_psp_init().
◆ bench_psp_init()
Definition at line 135 of file bench_PSP.c.
References puk_receptacle_PadicoSimplePackets_s::_status, assert(), bench_common_param, bench_psp_handler(), bench_common_param_s::client_node, component, cond, padico_psp_driver_s::connect, puk_receptacle_PadicoSimplePackets_s::driver, padico_psp_driver_s::init, instance, bench_common_param_s::is_server, len_offset, padico_psp_driver_s::listen, mutex, NULL, padico_ns_serial_selector(), padico_tm_msleep(), peer, psp, puk_iface_PadicoSimplePackets(), puk_instance_indirect_PadicoSimplePackets(), and bench_common_param_s::server_node.
◆ bench_psp_post_recv()
Definition at line 40 of file bench_PSP.c.
References buffer, cond, mutex, recv_buffer, recv_lenbuf, and recv_tid.
Referenced by psp_client(), and psp_server().
◆ bench_psp_run()
Definition at line 201 of file bench_PSP.c.
References psp_bench, and the_bench().
◆ bench_psp_send()
Definition at line 68 of file bench_PSP.c.
References puk_receptacle_PadicoSimplePackets_s::_status, buffer, puk_receptacle_PadicoSimplePackets_s::driver, padico_psp_driver_s::end_message, header, len_offset, padico_psp_driver_s::new_message, num_trips, padico_psp_driver_s::pack, peer, and psp.
Referenced by psp_client(), and psp_server().
◆ bench_psp_wait()
Definition at line 51 of file bench_PSP.c.
References cond, mutex, NULL, num_trips, recv_buffer, and recv_lenbuf.
Referenced by psp_client(), and psp_server().
◆ my_memcpy()
◆ padico_module_create_initializer__bench_PSP()
Definition at line 13 of file bench_PSP.c.
◆ psp_client()
Definition at line 185 of file bench_PSP.c.
References bench_psp_post_recv(), bench_psp_send(), bench_psp_wait(), and buffer.
◆ psp_server()
Definition at line 176 of file bench_PSP.c.
References bench_psp_post_recv(), bench_psp_send(), bench_psp_wait(), and buffer.
Variable Documentation
◆ cond
|
static |
Definition at line 22 of file bench_PSP.c.
Referenced by bench_psp_handler(), bench_psp_init(), bench_psp_post_recv(), and bench_psp_wait().
◆ len_offset
|
static |
Definition at line 17 of file bench_PSP.c.
Referenced by bench_psp_handler(), bench_psp_init(), and bench_psp_send().
◆ mutex
|
static |
Definition at line 21 of file bench_PSP.c.
Referenced by bench_psp_handler(), bench_psp_init(), bench_psp_post_recv(), and bench_psp_wait().
◆ num_trips
|
static |
number of messages received
Definition at line 19 of file bench_PSP.c.
Referenced by bench_psp_handler(), bench_psp_send(), and bench_psp_wait().
◆ padico_mod_binary__bench_PSP
| struct puk_mod_binary_s padico_mod_binary__bench_PSP = { .name = "bench_PSP", .funcs = &padico_mod_funcs__bench_PSP , .mod = NULL, .profile = { .total_mem = 0, .max_mem = 0, .num_malloc = 0, .num_free = 0 } , .auto_deps = & puk_mod_dep_PSP , .n_deps = sizeof((char*[]){ 0, }) / sizeof(char*), .deps = { NULL, } } |
Definition at line 13 of file bench_PSP.c.
◆ padico_mod_funcs__bench_PSP
|
static |
Definition at line 13 of file bench_PSP.c.
◆ peer
|
static |
Definition at line 24 of file bench_PSP.c.
Referenced by bench_psp_init(), and bench_psp_send().
◆ psp
|
static |
Definition at line 25 of file bench_PSP.c.
Referenced by bench_psp_init(), bench_psp_send(), padico_psp_connect(), padico_psp_end_message(), padico_psp_init(), padico_psp_listen(), padico_psp_new_message(), and padico_psp_pack().
◆ psp_bench
|
static |
Definition at line 194 of file bench_PSP.c.
Referenced by bench_psp_run().
◆ recv_buffer
buffer for receipt
Definition at line 15 of file bench_PSP.c.
Referenced by bench_psp_handler(), bench_psp_post_recv(), and bench_psp_wait().
◆ recv_lenbuf
|
static |
len of above buffer
Definition at line 16 of file bench_PSP.c.
Referenced by bench_psp_handler(), bench_psp_post_recv(), and bench_psp_wait().
◆ recv_tid
|
static |
Definition at line 18 of file bench_PSP.c.
Referenced by bench_psp_handler(), and bench_psp_post_recv().