QF_gc() implementation. More...
#include "qf_pkg.h"#include "qassert.h"Go to the source code of this file.
Functions | |
| void | QF_gc (QEvent const *e) |
| Recycle a dynamic event. | |
QF_gc() implementation.
Definition in file qf_gc.c.
| void QF_gc | ( | QEvent const * | e | ) |
Recycle a dynamic event.
This function implements a simple garbage collector for the dynamic events. Only dynamic events are candidates for recycling. (A dynamic event is one that is allocated from an event pool, which is determined as non-zero e->attrQF__ attribute.) Next, the function decrements the reference counter of the event, and recycles the event only if the counter drops to zero (meaning that no more references are outstanding for this event). The dynamic event is recycled by returning it to the pool from which it was originally allocated. The pool-of-origin information is stored in the upper 2-MSBs of the e->attrQF__ attribute.)
Definition at line 40 of file qf_gc.c.
References Q_ASSERT, QF_EPOOL_PUT_, QF_maxPool_, QF_pool_, QS_BEGIN_NOLOCK_, QS_END_NOLOCK_, QS_QF_GC, QS_QF_GC_ATTEMPT, QS_SIG_, and QS_U8_.
Referenced by QF_publish(), and QF_run().
1.6.3