Debug functions
===============
-Debug object function reference
--------------------------------
-
.. kernel-doc:: lib/debugobjects.c
- :export:
-
-debug_object_init
--------------------
+ :functions: debug_object_init
This function is called whenever the initialization function of a real
object is called.
calling code must use debug_object_init_on_stack() and remove the
object before leaving the function which allocated it. See next section.
-debug_object_init_on_stack
-------------------------------
+.. kernel-doc:: lib/debugobjects.c
+ :functions: debug_object_init_on_stack
This function is called whenever the initialization function of a real
object which resides on the stack is called.
calling debug_object_free() before the function which allocates the
object returns. Otherwise we keep track of stale objects.
-debug_object_activate
------------------------
+.. kernel-doc:: lib/debugobjects.c
+ :functions: debug_object_activate
This function is called whenever the activation function of a real
object is called.
When the activation is legitimate, then the state of the associated
tracker object is set to ODEBUG_STATE_ACTIVE.
-debug_object_deactivate
--------------------------
+
+.. kernel-doc:: lib/debugobjects.c
+ :functions: debug_object_deactivate
This function is called whenever the deactivation function of a real
object is called.
When the deactivation is legitimate, then the state of the associated
tracker object is set to ODEBUG_STATE_INACTIVE.
-debug_object_destroy
-----------------------
+.. kernel-doc:: lib/debugobjects.c
+ :functions: debug_object_destroy
This function is called to mark an object destroyed. This is useful to
prevent the usage of invalid objects, which are still available in
When the destruction is legitimate, then the state of the associated
tracker object is set to ODEBUG_STATE_DESTROYED.
-debug_object_free
--------------------
+.. kernel-doc:: lib/debugobjects.c
+ :functions: debug_object_free
This function is called before an object is freed.
Note that debug_object_free removes the object from the tracker. Later
usage of the object is detected by the other debug checks.
-debug_object_assert_init
----------------------------
+
+.. kernel-doc:: lib/debugobjects.c
+ :functions: debug_object_assert_init
This function is called to assert that an object has been initialized.