From: Sebastian Harl Date: Fri, 3 Jan 2014 12:23:51 +0000 (+0100) Subject: utils llist: Added TODO note about iterator improvements. X-Git-Tag: sysdb-0.1.0~258 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86008386cf41fac1355c260f490d40e084696f46;p=sysdb.git utils llist: Added TODO note about iterator improvements. --- diff --git a/src/utils/llist.c b/src/utils/llist.c index c56cdbd..401a4ba 100644 --- a/src/utils/llist.c +++ b/src/utils/llist.c @@ -443,6 +443,11 @@ sdb_llist_iter_get_next(sdb_llist_iter_t *iter) pthread_rwlock_rdlock(&iter->list->lock); + /* XXX: increment ref-cnt for this object? + * also: when letting an element take ownership of next and prev + * elements, this might be a fairly cheap way to implement a weak + * type of snapshotting */ + obj = iter->elem->obj; iter->elem = iter->elem->next;