Line data Source code
1 1 : /** 2 : * @file lib/state/state.c 3 : * 4 : * @brief LP main state management 5 : * 6 : * This library is responsible for allows LPs to set their state entry 7 : * point and change it at runtime. 8 : * 9 : * SPDX-FileCopyrightText: 2008-2021 HPDCS Group <rootsim@googlegroups.com> 10 : * SPDX-License-Identifier: GPL-3.0-only 11 : */ 12 : #include <lib/state/state.h> 13 : 14 : #include <lib/lib_internal.h> 15 : 16 0 : void SetState(void *state) 17 : { 18 : struct lib_ctx *ctx = lib_ctx_get(); 19 : ctx->state_s = state; 20 : } 21 : 22 0 : void state_lib_lp_init(void) 23 : { 24 : lib_ctx_get()->state_s = NULL; 25 : }