summaryrefslogtreecommitdiffstats
path: root/lib/list
Commit message (Collapse)AuthorAgeFilesLines
* lib: consolidate util macros in util/util.hJeremy Kerr2013-11-131-10/+2
| | | | | | | This change groups the offsetof, container_of and ARRAY_SIZE macros in a single header file util/util.h. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/list: Fix handling of empty listsJeremy Kerr2013-05-031-5/+6
| | | | | | | | | | | The current list_for_each_entry_safe marco SEGVs on empty lists; the list_entry will give us a NULL tmp on the first iteration. This change removes the use of list_entry, as we're effectively by-passing its NULL return semantics with our own. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* list: Fix seg fault with list_for_each_entry_safeGeoff Levand2013-04-231-7/+5
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* lib/list: Add list_for_each_entry_safeJeremy Kerr2013-04-161-0/+8
| | | | | | | Add a list iterator that is safe against deletion of the current element. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add new macro DEFINE_LIST()Geoff Levand2012-03-261-1/+3
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add list_prev_entry, list_next_entryGeoff Levand2011-11-111-4/+9
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Return NULL for head list_entryGeoff Levand2011-11-111-7/+9
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Cleanup list formattingGeoff Levand2011-11-111-12/+12
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add STATIC_LIST initializerGeoff Levand2011-11-111-0/+7
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Rename symbol newGeoff Levand2009-03-232-16/+16
| | | | | | | Change the symbol 'new' to an alternative. The symbol new is reserved for C++ compilers. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add list_for_each_entry_continue routineGeoff Levand2009-03-231-0/+4
| | | | | | | Add a new list iteration routine list_for_each_entry_continue(). Continues iteration from a user specified list item. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add list insert routinesGeoff Levand2009-02-212-9/+23
| | | | | | | | Add new list insertion routines list_insert_before(), list_insert_after(), and list_add_tail(). Also, change list_add() to use list_insert_after(). Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Use talloc for device handler destructionJeremy Kerr2008-12-161-7/+0
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add device handler cleanupJeremy Kerr2008-12-161-0/+7
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Initial support for multiple UIsJeremy Kerr2008-12-152-0/+63
Move the device discovery code from separate udev helpers to a single process to listen on two sockets: one SOCK_DGRAM for incoming udev events, and one SOCK_STREAM for UIs to connect. Initial support for client/server infrastructure, still need to wire-up the udev messages. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud