Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Data Fields | |
int | category |
int | event_name_hash |
unsigned int | seq |
struct timeval | tv |
int | usecount |
Linked list of events. Global events are appended to the list by append_event(). The usecount is the number of stored pointers to the element, excluding the list pointers. So an element that is only in the list has a usecount of 0, not 1.
Clients have a pointer to the last event processed, and for each of these clients we track the usecount of the elements. If we have a pointer to an entry in the list, it is safe to navigate it forward because elements will not be deleted, but only appended. The worst that can happen is seeing the pointer still NULL.
When the usecount of an element drops to 0, and the element is the first in the list, we can remove it. Removal is done within the main thread, which is woken up for the purpose.
For simplicity of implementation, we make sure the list is never empty.
int category |
Definition at line 154 of file manager.c.
Referenced by action_waitevent(), handle_showmaneventq(), and process_events().
int event_name_hash |
Definition at line 157 of file manager.c.
Referenced by filter_cmp_fn(), and should_send_event().
struct timeval tv |
int usecount |
Definition at line 153 of file manager.c.
Referenced by advance_event(), grab_last(), handle_showmaneventq(), purge_events(), and session_destructor().