1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /* Copyright(c) 2007-2022 Intel Corporation */
3 /* $FreeBSD$ */
4 /**
5 ***************************************************************************
6 * @file sal_service_state.c Service state checks
7 *
8 * @ingroup SalServiceState
9 *
10 ***************************************************************************/
11
12 /*
13 *******************************************************************************
14 * Include public/global header files
15 *******************************************************************************
16 */
17
18 #include "cpa.h"
19 #include "qat_utils.h"
20 #include "lac_list.h"
21 #include "icp_accel_devices.h"
22 #include "icp_adf_debug.h"
23 #include "lac_sal_types.h"
24 #include "sal_service_state.h"
25
26 CpaBoolean
27 Sal_ServiceIsRunning(CpaInstanceHandle instanceHandle)
28 {
29 sal_service_t *pService = (sal_service_t *)instanceHandle;
30
31 if (SAL_SERVICE_STATE_RUNNING == pService->state) {
32 return CPA_TRUE;
33 }
34 return CPA_FALSE;
35 }
36
37 CpaBoolean
38 Sal_ServiceIsRestarting(CpaInstanceHandle instanceHandle)
39 {
40 sal_service_t *pService = (sal_service_t *)instanceHandle;
41
42 if (SAL_SERVICE_STATE_RESTARTING == pService->state) {
43 return CPA_TRUE;
44 }
45 return CPA_FALSE;
46 }
Cache object: ae6d470a74f1ff977a8f04deb5c115f8
|