Callback function definitions. STMicroelectronics ST200-TOOLSET
விளம்பரம்
விளம்பரம்
Callbacks OS21
Table 16.
Types defined in callback.h
Type
callback_excp_install_fn_t callback_excp_uninstall_fn_t callback_excp_enter_fn_t callback_excp_exit_fn_t callback_intr_install_fn_t callback_intr_uninstall_fn_t callback_intr_enter_fn_t callback_intr_exit_fn_t callback_task_create_fn_t callback_task_delete_fn_t callback_task_exit_fn_t callback_task_switch_fn_t
Description
Callback function type for exception install events
Callback function type for exception uninstall events
Callback function type for exception enter events
Callback function type for exception exit events
Callback function type for interrupt install events
Callback function type for interrupt uninstall events
Callback function type for interrupt enter events
Callback function type for interrupt exit events
Callback function type for task create events
Callback function type for task delete events
Callback function type for task exit events
Callback function type for task switch events
5.2 Callback function definitions callback_exception_enter
Register a callback routine for exception entry events
Definition:
#include <os21.h> callback_excp_enter_fn_t callback_exception_enter(
callback_excp_enter_fn_t fn);
Arguments:
callback_excp_enter_fn_t fn
Function to be called on exception handler entry
Returns:
Errors:
Context:
Description:
See also:
Note:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_exception_enter()
registers a function to be called whenever an exception handler is called.
callback_excp_enter_fn_t
is defined in callback.h as follows: typedef void (*callback_excp_enter_fn_t)(void* handler); where handler is the address of the exception handler being called.
exception_install()
The fact that an exception handler is called does not necessarily mean that the exception occurred. Multiple handlers can share the same exception. See
Chapter 14: Exceptions on page 180
for more information.
90/226 7358306
OS21 Callbacks
callback_exception_exit
Register a callback routine for exception exit events
Definition:
#include <os21.h> callback_excp_exit_fn_t callback_exception_exit(
callback_excp_exit_fn_t fn);
Arguments:
callback_excp_exit_fn_t fn
Function to be called on exception handler exit
Returns:
Errors:
Context:
Description:
See also:
Note:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_exception_exit()
registers a function to be called whenever an exception handler exits.
callback_excp_exit_fn_t
is defined in callback.h as follows: typedef void (*callback_excp_exit_fn_t)(void* handler); where handler is the address of the handler being exited.
exception_install()
The fact that an exception handler is called does not necessarily mean that the exception occurred. Multiple handlers can share the same exception. See
Chapter 14: Exceptions on page 180
for more information.
7358306 91/226
Callbacks OS21
callback_exception_install
Register a callback routine for exception install events
Definition:
#include <os21.h> callback_excp_install_fn_t callback_exception_install(
callback_excp_install_fn_t fn);
Arguments:
callback_excp_install_fn_t fn
Function to be called on exception handler install
Returns:
Errors:
Context:
Description:
See also:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_exception_install()
registers a function to be called whenever an exception handler install occurs. callback_excp_install_fn_t
is defined in callback.h as follows: typedef void (*callback_excp_install_fn_t)(void* handler); where handler is the address of the handler being installed.
exception_install()
92/226 7358306
OS21 Callbacks
callback_exception_uninstall
Register a callback routine for exception delete events
Definition:
#include <os21.h> callback_excp_uninstall_fn_t callback_exception_uninstall(
callback_excp_uninstall_fn_t fn);
Arguments:
callback_excp_uninstall_fn_t fn
Function to be called on exception handler uninstall.
Returns:
Errors:
Context:
Description:
See also:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_exception_uninstall()
registers a function to be called whenever an exception handler uninstall occurs. callback_excp_uninstall_fn_t
is defined in callback.h as follows: typedef void (*callback_excp_uninstall_fn_t)(void* handler); where handler is the address of the handler being uninstalled.
exception_uninstall()
7358306 93/226
Callbacks OS21
callback_interrupt_enter
Register a callback routine for interrupt entry events
Definition:
#include <os21.h> callback_intr_enter_fn_t callback_interrupt_enter(
callback_intr_enter_fn_t fn);
Arguments:
callback_intr_enter_fn_t fn
Function to be called on interrupt handler entry
Returns:
Errors:
Context:
Description:
See also:
Note:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_interrupt_enter()
registers a function to be called whenever an interrupt handler is called.
callback_intr_enter_fn_t
is defined in callback.h as follows: typedef void (*callback_intr_enter_fn_t)(void* handler); where handler is the address of handler being called.
interrupt_install()
The fact that an interrupt handler is called does not necessarily mean that the interrupt
occurred. Multiple handlers can share the same interrupt. See Chapter 11: Interrupts on page 145
for more information.
94/226 7358306
OS21 Callbacks
callback_interrupt_exit
Register a callback routine for interrupt exit events
Definition:
#include <os21.h> callback_intr_exit_fn_t callback_interrupt_exit(
callback_intr_exit_fn_t fn);
Arguments:
callback_intr_exit_fn_t fn
Function to be called on interrupt handler exit
Returns:
Errors:
Context:
Description:
See also:
Note:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_interrupt_exit()
registers a function to be called whenever an interrupt handler exits.
callback_intr_exit_fn_t
is defined in callback.h as follows: typedef void (*callback_intr_exit_fn_t)(void* handler); where handler is the address of the handler being exited.
interrupt_install()
The fact that an interrupt handler is called does not necessarily mean that the interrupt
occured. Multiple handlers can share the same interrupt. See Chapter 11: Interrupts on page 145
for more information.
7358306 95/226
Callbacks OS21
callback_interrupt_install
Register a callback routine for interrupt install events
Definition:
#include <os21.h> callback_intr_install_fn_t callback_interrupt_install(
callback_intr_install_fn_t fn);
Arguments:
callback_intr_install_fn_t fn
Function to be called on interrupt handler install
Returns:
Errors:
Context:
Description:
See also:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_interrupt_install()
registers a function to be called whenever an interrupt handler install occurs. callback_intr_install_fn_t
is defined in callback.h as follows: typedef void (*callback_intr_install_fn_t)(void* handler); where handler is the address of the handler being installed.
interrupt_install()
96/226 7358306
OS21 Callbacks
callback_interrupt_uninstall
Register a callback routine for interrupt delete events
Definition:
#include <os21.h> callback_intr_uninstall_fn_t callback_interrupt_uninstall(
callback_intr_uninstall_fn_t fn);
Arguments:
callback_intr_uninstall_fn_t fn
Function to be called on interrupt handler uninstall.
Returns:
Errors:
Context:
Description:
See also:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_interrupt_uninstall()
registers a function to be called whenever an interrupt handler uninstall occurs. callback_intr_uninstall_fn_t
is defined in callback.h as follows: typedef void (*callback_intr_uninstall_fn_t)(void* handler); where handler is the address of the handler being uninstalled.
interrupt_uninstall()
7358306 97/226
Callbacks OS21
callback_task_create
Register a callback routine for task create events
Definition:
#include <os21.h> callback_task_create_fn_t callback_task_create(
callback_task_create_fn_t fn);
Arguments:
callback_task_create_fn_t fn
Function to be called on task create
Returns:
Errors:
Context:
Description:
See also:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_task_create()
registers a function to be called whenever a task create occurs. callback_task_create_fn_t
is defined in callback.h as follows: typedef void (*callback_task_create_fn_t)(task_t* new_task); where new_task is the task being created.
task_create()
callback_task_delete
Register a callback routine for task delete events
Definition:
#include <os21.h> callback_task_delete_fn_t callback_task_delete(
callback_task_delete_fn_t fn);
Arguments:
callback_task_delete_fn_t fn
Function to be called on task delete
Returns:
Errors:
Context:
Description:
See also:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_task_delete()
registers a function to be called whenever a task delete occurs. callback_task_delete_fn_t
is defined in callback.h as follows: typedef void (*callback_task_delete_fn_t)(task_t* task); where task is the task being deleted.
task_delete()
98/226 7358306
OS21 Callbacks
callback_task_exit
Register a callback routine for task exit events
Definition:
#include <os21.h> callback_task_exit_fn_t callback_task_exit(
callback_task_exit_fn_t fn);
Arguments:
callback_task_exit_fn_t fn
Function to be called on task exit
Returns:
Errors:
Context:
Description:
See also:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_task_exit()
registers a function to be called whenever a task exit occurs. callback_task_exit_fn_t
is defined in callback.h as follows: typedef void (*callback_task_exit_fn_t)(task_t* task); where task is the task being exited.
task_exit()
callback_task_switch
Register a callback routine for task switch events
Definition:
#include <os21.h> callback_task_switch_fn_t callback_task_switch(
callback_task_switch_fn_t fn);
Arguments:
callback_task_switch_fn_t fn
Function to be called on task switch
Returns:
Errors:
Context:
Description:
Pointer to previously installed callback function. NULL if none.
None
Callable from task or system context.
callback_task_switch()
registers a function to be called whenever a task switch occurs. callback_task_switch_fn_t
is defined in callback.h as follows: typedef void (*callback_task_switch_fn_t)(
task_t* old_task,
task_t* new_task); where: old_task new_task the task to switch from.
the task to switch to.
Either old_task or new_task can be NULL to indicate that the CPU is either leaving or entering an idle state.
7358306 99/226
பதிவிறக்கு
விளம்பரம்