Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 2013 10:28:02 +0000 (UTC)
From:      Jean-Sebastien Pedron <dumbbell@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254841 - head/sys/dev/drm2
Message-ID:  <201308251028.r7PAS2j5003449@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Sun Aug 25 10:28:02 2013
New Revision: 254841
URL: http://svnweb.freebsd.org/changeset/base/254841

Log:
  drm: Import list_for_each_entry_safe_from() macro

Modified:
  head/sys/dev/drm2/drm_linux_list.h

Modified: head/sys/dev/drm2/drm_linux_list.h
==============================================================================
--- head/sys/dev/drm2/drm_linux_list.h	Sun Aug 25 10:13:23 2013	(r254840)
+++ head/sys/dev/drm2/drm_linux_list.h	Sun Aug 25 10:28:02 2013	(r254841)
@@ -144,6 +144,11 @@ list_del_init(struct list_head *entry) {
 	    &pos->member != (head);					\
 	    pos = n, n = list_entry(n->member.next, __typeof(*n), member))
 
+#define list_for_each_entry_safe_from(pos, n, head, member) 			\
+	for (n = list_entry(pos->member.next, __typeof(*pos), member);		\
+	     &pos->member != (head);						\
+	     pos = n, n = list_entry(n->member.next, __typeof(*n), member))
+
 #define list_first_entry(ptr, type, member) \
 	list_entry((ptr)->next, type, member)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308251028.r7PAS2j5003449>