LCOV - code coverage report
Current view: top level - spdk/lib/event - scheduler_static.c (source / functions) Hit Total Coverage
Test: Combined Lines: 10 12 83.3 %
Date: 2024-07-11 03:23:54 Functions: 5 6 83.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*   SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  *   Copyright (C) 2020 Intel Corporation.
       3                 :            :  *   All rights reserved.
       4                 :            :  */
       5                 :            : 
       6                 :            : #include "spdk/stdinc.h"
       7                 :            : #include "spdk/likely.h"
       8                 :            : #include "spdk/event.h"
       9                 :            : #include "spdk/log.h"
      10                 :            : #include "spdk/env.h"
      11                 :            : #include "spdk/scheduler.h"
      12                 :            : 
      13                 :            : #include "spdk_internal/event.h"
      14                 :            : 
      15                 :            : static int
      16                 :        884 : init_static(void)
      17                 :            : {
      18                 :            :         /* There is no scheduling performed by static scheduler,
      19                 :            :          * do not set the scheduling period. */
      20                 :        884 :         spdk_scheduler_set_period(0);
      21                 :        884 :         return 0;
      22                 :            : }
      23                 :            : 
      24                 :            : static void
      25                 :        884 : deinit_static(void)
      26                 :            : {
      27                 :        884 : }
      28                 :            : 
      29                 :            : static void
      30                 :         13 : balance_static(struct spdk_scheduler_core_info *cores, uint32_t core_count)
      31                 :            : {
      32                 :         13 : }
      33                 :            : 
      34                 :            : static int
      35                 :         42 : set_opts_static(const struct spdk_json_val *opts)
      36                 :            : {
      37                 :         42 :         return 0;
      38                 :            : }
      39                 :            : 
      40                 :            : static void
      41                 :          0 : get_opts_static(struct spdk_json_write_ctx *ctx)
      42                 :            : {
      43                 :          0 : }
      44                 :            : 
      45                 :            : static struct spdk_scheduler scheduler = {
      46                 :            :         .name = "static",
      47                 :            :         .init = init_static,
      48                 :            :         .deinit = deinit_static,
      49                 :            :         .balance = balance_static,
      50                 :            :         .set_opts = set_opts_static,
      51                 :            :         .get_opts = get_opts_static,
      52                 :            : };
      53                 :       2893 : SPDK_SCHEDULER_REGISTER(scheduler);

Generated by: LCOV version 1.14