OSDN Git Service

shared/queue: Remove reference count from queue_entry
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 4 Nov 2015 10:40:36 +0000 (12:40 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sun, 8 Nov 2015 18:07:51 +0000 (20:07 +0200)
commitf1485b759892e144f0750f1ffc120c23cd60d171
tree3f01c839f43c1f280310a3399decfe48da4f91c1
parentc5a49786e316b997352d2b54dc7c201a21d16afc
shared/queue: Remove reference count from queue_entry

Since the queue itself has support for reference and queue_foreach
actually make use of it to prevent crashes when queue_destroy is
called from the callback.

Note: The intention of reference count was to protect the entry itself
in queue_foreach, it may still be possible to have a crash if the next
entry if freed but that should be considered an implementation bug.
src/shared/queue.c
src/shared/queue.h