shl: hook: add helpers to add callbacks only once
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 13 Jan 2013 10:23:05 +0000 (11:23 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 13 Jan 2013 10:26:05 +0000 (11:26 +0100)
commit8fa28926cbe8fdcf0ec8f96d932e160399a1ac8a
treeca263a31d61a915b2f8f86e6613d223c4d264823
parent041baf4c40f45d3f3cc56645edfc6f3433c66047
shl: hook: add helpers to add callbacks only once

Very often we want to avoid adding callbacks multiple times. Currently we
have to keep track of this in each module with a boolean value.
To simplify this procedure, we add helpers that guarantee that entries are
only added once and a helper to remove all entries with a given cb+data
combination.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/shl_hook.h