LCOV - code coverage report
Current view: top level - app/fdctl/run/tiles - fd_blackhole.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 21 0.0 %
Date: 2024-11-13 11:58:15 Functions: 0 2 0.0 %

          Line data    Source code
       1             : #include "../../../../disco/tiles.h"
       2             : 
       3             : /* A /dev/null semantic tile which just drops (filters) every incoming
       4             :    packet it receives. */
       5             : 
       6             : static inline int
       7             : before_frag( void * _ctx,
       8             :              ulong  in_idx,
       9             :              ulong  seq,
      10           0 :              ulong  sig ) {
      11           0 :   (void)_ctx;
      12           0 :   (void)in_idx;
      13           0 :   (void)seq;
      14           0 :   (void)sig;
      15             : 
      16           0 :   return 1;
      17           0 : }
      18             : 
      19             : static ulong
      20             : populate_allowed_fds( fd_topo_t const *      topo,
      21             :                       fd_topo_tile_t const * tile,
      22             :                       ulong                  out_fds_cnt,
      23           0 :                       int *                  out_fds ) {
      24           0 :   (void)topo;
      25           0 :   (void)tile;
      26             : 
      27           0 :   if( FD_UNLIKELY( out_fds_cnt<2UL ) ) FD_LOG_ERR(( "out_fds_cnt %lu", out_fds_cnt ));
      28             : 
      29           0 :   ulong out_cnt = 0UL;
      30           0 :   out_fds[ out_cnt++ ] = 2; /* stderr */
      31           0 :   if( FD_LIKELY( -1!=fd_log_private_logfile_fd() ) )
      32           0 :     out_fds[ out_cnt++ ] = fd_log_private_logfile_fd(); /* logfile */
      33           0 :   return out_cnt;
      34           0 : }
      35             : 
      36           0 : #define STEM_BURST (1UL)
      37             : 
      38           0 : #define STEM_CALLBACK_CONTEXT_TYPE  void
      39           0 : #define STEM_CALLBACK_CONTEXT_ALIGN 1UL
      40             : 
      41           0 : #define STEM_CALLBACK_BEFORE_FRAG before_frag
      42             : 
      43             : #include "../../../../disco/stem/fd_stem.c"
      44             : 
      45             : fd_topo_run_tile_t fd_tile_blackhole = {
      46             :   .name                 = "bhole",
      47             :   .populate_allowed_fds = populate_allowed_fds,
      48             :   .run                  = stem_run,
      49             : };

Generated by: LCOV version 1.14