dpc.h (985B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: dpc.h 8 * Purpose: Deferred Procedure Call module 9 */ 10 11 #ifndef _SAL_DPC_H 12 #define _SAL_DPC_H 13 14 #include <sal/core/time.h> 15 #include <sal/core/thread.h> 16 17 typedef void (*sal_dpc_fn_t)(void *owner, void *, void *, void *, void *); 18 19 extern int sal_dpc_init(void); 20 extern void sal_dpc_term(void); 21 extern int sal_dpc_config(int, int); 22 23 extern int sal_dpc(sal_dpc_fn_t, void *owner, void *, void *, void *, void *); 24 extern int sal_dpc_time(sal_usecs_t usec, 25 sal_dpc_fn_t, 26 void *owner, void *, void *, void *, void *); 27 28 extern void sal_dpc_cancel(void *owner); 29 extern int sal_dpc_enable(void *owner); 30 extern int sal_dpc_disable(void *owner); 31 extern int sal_dpc_disable_and_wait(void *owner); 32 extern void sal_dpc_cancel_and_disable(void *owner); 33 34 #endif /* !_SAL_DPC_H */ 35