6 Commits

Author SHA1 Message Date
David Herrmann
3a480dc910 misc: add kmscon_hook_num() helper
This helper returns the number of registered callbacks for an hook.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-15 14:57:17 +02:00
David Herrmann
2707ba7336 misc: hash-table wrapper
We want to move away from glib eventually. Until then, we use a simple
wrapper around the hash-table functions so we need to change a single
place only.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-30 18:42:12 +02:00
David Herrmann
56f5eebf0e hook: delete by callback *and* data argument
When deleting a hook we should not search for the callback only. Otherwise
we might remove the wrong callback. Therefore, we now search for callback
and data argument. If multiple callbacks are registered with the same data
and cb, then we don't care which one is removed as this wouldn't make any
difference. They behave the same way, anyway.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-25 17:08:00 +02:00
David Herrmann
c04c807eca misc: add hook structure
The hook structure can be used to provide a central hook where other
subsystems can register callbacks.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-24 15:12:37 +01:00
Ran Benita
37cb482bbc ring: fix is_empty
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-02-04 16:30:24 +01:00
David Herrmann
2c8622d468 Add ring buffer object
The new ring buffer object will be used to buffer a byte-stream between
two sockets.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-01-28 17:16:37 +01:00