273 #ifndef ti_sysbios_knl_Swi__include 274 #define ti_sysbios_knl_Swi__include 289 #define ti_sysbios_knl_Swi_long_names 290 #include "Swi_defs.h" 301 #define Swi_A_swiDisabled "cannot create a SWI when Swi is disabled" 308 #define Swi_A_badPriority "invalid priority" 328 typedef struct Swi_Module_State Swi_Module_State;
362 struct Swi_Module_State {
364 volatile bool locked;
366 unsigned int curTrigger;
410 unsigned int priority;
413 unsigned int initTrigger;
427 unsigned int trigger;
444 typedef unsigned int (*CT__Swi_taskDisable)(void);
445 extern const CT__Swi_taskDisable Swi_taskDisable;
447 typedef void (*CT__Swi_taskRestore)(
unsigned int arg1);
448 extern const CT__Swi_taskRestore Swi_taskRestore;
507 extern void Swi_init(
void);
511 extern void Swi_Instance_finalize(
Swi_Object *obj,
int ec);
632 extern void Swi_startup(
void);
637 extern bool Swi_enabled(
void);
646 extern void Swi_unlockSched(
void);
766 extern void Swi_enable(
void);
814 extern void Swi_restoreHwi(
unsigned int key);
889 extern unsigned int Swi_raisePri(
unsigned int priority);
914 extern void Swi_restorePri(
unsigned int key);
957 extern void Swi_andn(Swi_Handle swi,
unsigned int mask);
989 extern void Swi_dec(Swi_Handle swi);
1066 extern unsigned int Swi_getPri(Swi_Handle swi);
1150 extern void Swi_setPri(Swi_Handle swi,
unsigned int priority);
1178 extern void Swi_inc(Swi_Handle swi);
1211 extern void Swi_or(Swi_Handle swi,
unsigned int mask);
1231 extern void Swi_post(Swi_Handle swi);
1234 extern void Swi_schedule(
void);
1236 extern void Swi_runLoop(
void);
1242 extern void Swi_restoreSMP(
void);
1244 extern Swi_Module_State Swi_Module_state;
1246 #define Swi_module ((Swi_Module_State *) &(Swi_Module_state)) 1248 #define Swi_Object_heap() NULL 1250 static inline char * Swi_Handle_name(Swi_Handle obj)
1255 static inline Swi_Handle Swi_handle(
Swi_Struct *str)
1257 return ((Swi_Handle)str);
1260 static inline Swi_Struct * Swi_struct(Swi_Handle h)
1272 #undef ti_sysbios_knl_Swi_long_names 1273 #include "Swi_defs.h" struct Swi_Struct Swi_Struct
Definition: Swi.h:310
void(* createFxn)(Swi_Handle arg1, Error_Block *arg2)
Definition: Swi.h:350
Swi hook set type definition.
Definition: Swi.h:348
void(* readyFxn)(Swi_Handle arg1)
Definition: Swi.h:351
char * name
Optional name for the object. NULL by default.
Definition: Swi.h:460
void(* deleteFxn)(Swi_Handle arg1)
Definition: Swi.h:354
char * Swi_getName(Swi_Handle swi)
Return a Swi's name.
void(* endFxn)(Swi_Handle arg1)
Definition: Swi.h:353
Swi_FuncPtr Swi_getFunc(Swi_Handle swi, uintptr_t *arg0, uintptr_t *arg1)
Get Swi function and arguments.
Swi_Handle Swi_Object_first(void)
return handle of the first Swi on Swi list
unsigned int Swi_getTrigger(void)
Return the trigger value of the currently executing Swi.
Opaque queue element.
Definition: Queue.h:204
void Swi_or(Swi_Handle swi, unsigned int mask)
Or mask with value contained in Swi's trigger and post the Swi.
Swi_Struct * Swi_Handle
Definition: Swi.h:312
unsigned int Swi_disable(void)
Disable Swi Scheduling.
struct Swi_Struct Swi_Object
Definition: Swi.h:311
void(* Swi_FuncPtr)(uintptr_t arg1, uintptr_t arg2)
Swi function type definition.
Definition: Swi.h:338
Swi_Handle Swi_self(void)
Return address of currently executing Swi object.
Swi_Handle Swi_Object_next(Swi_Handle swi)
return handle of the next Swi on Swi list
void(* registerFxn)(int arg1)
Definition: Swi.h:349
unsigned int trigger
Initial Swi trigger value.
Definition: Swi.h:503
void Swi_post(Swi_Handle swi)
Unconditionally post a software interrupt.
void Swi_restore(unsigned int key)
Restore Swi Scheduling state.
void Swi_dec(Swi_Handle swi)
Decrement Swi's trigger value; post if trigger becomes 0.
Error block.
Definition: Error.h:152
void Swi_setHookContext(Swi_Handle swi, int id, void *hookContext)
Set hook instance's context for a swi.
void Swi_inc(Swi_Handle swi)
Increment Swi's trigger value and post the Swi.
Swi_Handle Swi_construct(Swi_Struct *obj, Swi_FuncPtr swiFxn, const Swi_Params *prms, Error_Block *eb)
Construct a software interrupt.
uintptr_t arg0
Swi function argument 0.
Definition: Swi.h:468
const Swi_Hook Swi_hooks
const array to hold all HookSet objects.
int length
Definition: Swi.h:357
void Swi_destruct(Swi_Struct *obj)
Destruct a software interrupt.
uintptr_t arg1
Swi function argument 1.
Definition: Swi.h:476
Swi_Struct * Swi_Instance
Definition: Swi.h:313
void Swi_andn(Swi_Handle swi, unsigned int mask)
Clear bits in Swi's trigger; post if trigger becomes 0.
void Swi_getAttrs(Swi_Handle swi, Swi_FuncPtr *swiFxn, Swi_Params *params)
Retrieve attributes of an existing Swi object.
void Swi_delete(Swi_Handle *swi)
Delete a software interrupt.
unsigned int priority
Swi priority.
Definition: Swi.h:489
void Swi_setAttrs(Swi_Handle swi, Swi_FuncPtr swiFxn, Swi_Params *params)
Set the attributes of an existing Swi object.
Swi_Handle Swi_create(Swi_FuncPtr swiFxn, const Swi_Params *prms, Error_Block *eb)
Create a software interrupt.
void * Swi_getHookContext(Swi_Handle swi, int id)
Get hook instance's context pointer for a Swi.
void(* beginFxn)(Swi_Handle arg1)
Definition: Swi.h:352
unsigned int Swi_getPri(Swi_Handle swi)
Return a Swi's priority.
void Swi_Params_init(Swi_Params *prms)
Initialize the Swi_Params structure with default values.
const unsigned int Swi_numPriorities
Number of Swi priorities supported.
void Swi_setPri(Swi_Handle swi, unsigned int priority)
Set a Swi's priority.