mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
dix: make DeleteCallbackList() non-static and document it
Allow using it by other places outside this file, so we can also support callback lists in dynamically allocated structures: Those cases need to explicitly call DeleteCallbackList() before free()ing the structures - otherwise we're getting heap corruptions, because the actual deletion can happen asynchronously. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -10,4 +10,15 @@
|
||||
void InitCallbackManager(void);
|
||||
void DeleteCallbackManager(void);
|
||||
|
||||
/*
|
||||
* @brief delete a callback list
|
||||
*
|
||||
* Calling this is necessary if a CallbackListPtr is used inside a dynamically
|
||||
* allocated structure, before it is freed. If it's not done, memory corruption
|
||||
* or segfault can happen at a much later point (eg. next server incarnation)
|
||||
*
|
||||
* @param pcbl pointer to the list head (CallbackListPtr)
|
||||
*/
|
||||
void DeleteCallbackList(CallbackListPtr *pcbl);
|
||||
|
||||
#endif /* _XSERVER_CALLBACK_PRIV_H */
|
||||
|
||||
Reference in New Issue
Block a user