Functions | |
| void | rt_thread_idle_sethook (void(*hook)()) |
| void | rt_malloc_sethook (void(*hook)(void *ptr, rt_size_t size)) |
| void | rt_free_sethook (void(*hook)(void *ptr)) |
| void | rt_mp_alloc_sethook (void(*hook)(void *block)) |
| void | rt_mp_free_sethook (void(*hook)(void *block)) |
| void | rt_object_attach_sethook (void(*hook)(struct rt_object *object)) |
| void | rt_object_detach_sethook (void(*hook)(struct rt_object *object)) |
| void | rt_object_trytake_sethook (void(*hook)(struct rt_object *object)) |
| void | rt_object_take_sethook (void(*hook)(struct rt_object *object)) |
| void | rt_object_put_sethook (void(*hook)(struct rt_object *object)) |
| void | rt_scheduler_sethook (void(*hook)(struct rt_thread *from, struct rt_thread *to)) |
| void | rt_timer_timeout_sethook (void(*hook)(struct rt_timer *timer)) |
The hooks are a series of routines, which are invoked in some special checkpoints. The hook routines include:
| void rt_free_sethook | ( | void(*)(void *ptr) | hook | ) |
This function will set a hook function, which will be invoked when a memory block is released to heap memory.
| hook | the hook function |
| void rt_malloc_sethook | ( | void(*)(void *ptr, rt_size_t size) | hook | ) |
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory.
| hook | the hook function |
| void rt_mp_alloc_sethook | ( | void(*)(void *block) | hook | ) |
This function will set a hook function, which will be invoked when a memory block is allocated from memory pool.
| hook | the hook function |
| void rt_mp_free_sethook | ( | void(*)(void *block) | hook | ) |
This function will set a hook function, which will be invoked when a memory block is released to memory pool.
| hook | the hook function |
| void rt_object_attach_sethook | ( | void(*)(struct rt_object *object) | hook | ) |
This function will set a hook function, which will be invoked when object attaches to kernel object system.
| hook | the hook function |
| void rt_object_detach_sethook | ( | void(*)(struct rt_object *object) | hook | ) |
This function will set a hook function, which will be invoked when object detaches from kernel object system.
| hook | the hook function |
| void rt_object_put_sethook | ( | void(*)(struct rt_object *object) | hook | ) |
This function will set a hook function, which will be invoked when object is put to kernel object system.
| hook | the hook function |
| void rt_object_take_sethook | ( | void(*)(struct rt_object *object) | hook | ) |
This function will set a hook function, which will be invoked when object have been taken from kernel object system.
The object have been taken means that semaphore - semaphore have been taken by thread mutex - mutex have been taken by thread event/fast event - event/fast event have been received by thread mailbox - mail have been received by thread message queue - message have been received by thread timer - timer is started
| hook | the hook function |
| void rt_object_trytake_sethook | ( | void(*)(struct rt_object *object) | hook | ) |
This function will set a hook function, which will be invoked when object is taken from kernel object system.
The object is taken means that semaphore - semaphore is taken by thread mutex - mutex is taken by thread event/fast event - event/fast event is received by thread mailbox - mail is received by thread message queue - message is received by thread
| hook | the hook function |
| void rt_scheduler_sethook | ( | void(*)(struct rt_thread *from, struct rt_thread *to) | hook | ) |
This function will set a hook function, which will be invoked when thread switch happens.
| hook | the hook function |
| void rt_thread_idle_sethook | ( | void(*)() | hook | ) |
This function will set a hook function to idle thread loop.
| hook | the specified hook function |
| void rt_timer_timeout_sethook | ( | void(*)(struct rt_timer *timer) | hook | ) |
This function will set a hook function, which will be invoked when timer is timeout.
| hook | the hook function |
1.5.7