Detailed Description
In order to trace and record RT-Thread activity in runtime, a hook mechanism is introduced.
The hooks are a series of routines, which are invoked in some special checkpoints. The hook routines include:
- object hook, invoked at object created, deleted, taken and put etc.
- scheduler hook, invoked at thread switch and idle thread loop.
- memory hook, invoked when allocate or free memory block.
- timer hook, invoked when timer is timeout.
Function Documentation
This function will set a hook function to idle thread loop.
- Parameters:
-
hook | the specified hook function |
- Note:
- the hook function must be simple and never be blocked or suspend.
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory.
- Parameters:
-
This function will set a hook function, which will be invoked when a memory block is released to heap memory.
- Parameters:
-
This function will set a hook function, which will be invoked when a memory block is allocated from memory pool.
- Parameters:
-
This function will set a hook function, which will be invoked when a memory block is released to memory pool.
- Parameters:
-
This function will set a hook function, which will be invoked when module be loaded to system.
- Parameters:
-
This function will set a hook function, which will be invoked when module be unloaded from system.
- Parameters:
-
This function will set a hook function, which will be invoked when object attaches to kernel object system.
- Parameters:
-
This function will set a hook function, which will be invoked when object detaches from kernel object system.
- Parameters:
-
This function will set a hook function, which will be invoked when object is taken from kernel object system.
The object is taken means: semaphore - semaphore is taken by thread mutex - mutex is taken by thread event - event is received by thread mailbox - mail is received by thread message queue - message is received by thread
- Parameters:
-
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: semaphore - semaphore have been taken by thread mutex - mutex have been taken by thread event - 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
- Parameters:
-
This function will set a hook function, which will be invoked when object is put to kernel object system.
- Parameters:
-
This function will set a hook function, which will be invoked when thread switch happens.
- Parameters:
-
This function will set a hook function, which will be invoked when timer is timeout.
- Parameters:
-