[Pvfs2-cvs] commit by walt in pvfs2-1/src/common/quicklist:
quicklist.h
CVS commit program
cvs at parl.clemson.edu
Fri Aug 14 17:13:34 EDT 2009
Update of /projects/cvsroot/pvfs2-1/src/common/quicklist
In directory parlweb1:/tmp/cvs-serv31068/src/common/quicklist
Modified Files:
Tag: Orange-Branch
quicklist.h
Log Message:
merged Orange with Blue - first merging
Index: quicklist.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/common/quicklist/quicklist.h,v
diff -p -u -r1.8 -r1.8.8.1
--- quicklist.h 22 Feb 2009 20:07:00 -0000 1.8
+++ quicklist.h 14 Aug 2009 21:13:34 -0000 1.8.8.1
@@ -120,6 +120,23 @@ static __inline__ int qlist_empty(struct
}
/**
+ * qlist_pop - pop the first item off the list and return it
+ * @head: qlist to modify
+ */
+static __inline__ struct qlist_head* qlist_pop(struct qlist_head *head)
+{
+ struct qlist_head *item = NULL;
+
+ if (!qlist_empty(head))
+ {
+ item = head->next;
+ qlist_del(item);
+ }
+
+ return item;
+}
+
+/**
* qlist_splice - join two qlists
* @qlist: the new qlist to add.
* @head: the place to add it in the first qlist.
More information about the Pvfs2-cvs
mailing list