Branch: Tag:

2014-11-14

2014-11-14 18:13:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Updated C-level documentation of callbacks.

69:   #define check_callback_chain(X)   #endif    - /* Return the first free callback struct, allocate more if needed */ -  -  - /* Traverse a linked list of callbacks and call all the active callbacks + /** +  * Traverse a linked list of callbacks and call all the active callbacks    * in the list. Deactivated callbacks are freed and placed in the free list.    */   PMOD_EXPORT void low_call_callback(struct callback_list *lst, void *arg)
119:    }   }    - /* Add a callback to the linked list pointed to by ptr. */ + /** +  * Add a callback to the linked list pointed to by ptr. +  */   PMOD_EXPORT struct callback *debug_add_to_callback(struct callback_list *lst,    callback_func call,    void *arg,
139:    return l;   }    - /* This function deactivates a callback. -  * It is not actually freed until next time this callback is "called" + /** +  * Deactivates a callback. +  * It is not actually freed until next time the callback is "called".    */   PMOD_EXPORT void *remove_callback(struct callback *l)   {
149:    return l->arg;   }    - /* Free all the callbacks in a linked list of callbacks */ + /** +  * Free all the callbacks in a linked list of callbacks. +  */   void free_callback_list(struct callback_list *lst)   {    struct callback *l,**ptr;
164:    }   }    + /** +  * Free all callbacks. +  */   void cleanup_callbacks(void)   {    ba_destroy(&callback_allocator);   }