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 0 : init_static(void) 17 : { 18 : /* There is no scheduling performed by static scheduler, 19 : * do not set the scheduling period. */ 20 0 : spdk_scheduler_set_period(0); 21 0 : return 0; 22 : } 23 : 24 : static void 25 0 : deinit_static(void) 26 : { 27 0 : } 28 : 29 : static void 30 0 : balance_static(struct spdk_scheduler_core_info *cores, uint32_t core_count) 31 : { 32 0 : } 33 : 34 : static struct spdk_scheduler scheduler = { 35 : .name = "static", 36 : .init = init_static, 37 : .deinit = deinit_static, 38 : .balance = balance_static, 39 : }; 40 1 : SPDK_SCHEDULER_REGISTER(scheduler);