LCOV - code coverage report
Current view: top level - util/tile - fd_tile.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 8 8 100.0 %
Date: 2024-11-13 11:58:15 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #define _GNU_SOURCE
       2             : #include <errno.h>
       3             : #include <sched.h>
       4             : 
       5             : #include "fd_tile_private.h"
       6             : 
       7             : int
       8             : fd_cpuset_getaffinity( ulong         pid,
       9        2460 :                        fd_cpuset_t * mask ) {
      10        2460 : # if defined(__linux__)
      11        2460 :   return sched_getaffinity( (int)pid, fd_cpuset_word_cnt<<3, (cpu_set_t *)fd_type_pun( mask ) );
      12             : # else
      13             :   (void)pid; (void)mask;
      14             :   errno = ENOTSUP;
      15             :   return -1;
      16             : # endif
      17        2460 : }
      18             : 
      19             : int
      20             : fd_cpuset_setaffinity( ulong               pid,
      21           9 :                        fd_cpuset_t const * mask ) {
      22           9 : # if defined(__linux__)
      23           9 :   return sched_setaffinity( (int)pid, fd_cpuset_word_cnt<<3, (cpu_set_t const *)fd_type_pun_const( mask ) );
      24             : # else
      25             :   (void)pid; (void)mask;
      26             :   errno = ENOTSUP;
      27             :   return -1;
      28             : # endif
      29           9 : }

Generated by: LCOV version 1.14