Module Name: src Committed By: yamt Date: Wed Nov 2 13:52:34 UTC 2011
Modified Files: src/sys/sys: Makefile bufq_impl.h Log Message: buf_inorder: - make the return value bool - comments To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/sys/sys/Makefile cvs rdiff -u -r1.8 -r1.9 src/sys/sys/bufq_impl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/Makefile diff -u src/sys/sys/Makefile:1.138 src/sys/sys/Makefile:1.139 --- src/sys/sys/Makefile:1.138 Wed Sep 28 14:26:27 2011 +++ src/sys/sys/Makefile Wed Nov 2 13:52:34 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.138 2011/09/28 14:26:27 jruoho Exp $ +# $NetBSD: Makefile,v 1.139 2011/11/02 13:52:34 yamt Exp $ .include <bsd.sys.mk> @@ -27,8 +27,8 @@ INCS= acct.h agpio.h aio.h ansi.h aout_m param.h pcu.h pipe.h pmc.h poll.h pool.h power.h proc.h \ protosw.h pset.h ptrace.h ptree.h \ queue.h quota.h \ - ras.h rbtree.h reboot.h radioio.h resource.h resourcevar.h rmd160.h \ - rnd.h rwlock.h sa.h satypes.h \ + radixtree.h ras.h rbtree.h reboot.h radioio.h resource.h resourcevar.h \ + rmd160.h rnd.h rwlock.h sa.h satypes.h \ scanio.h sched.h scsiio.h sdt.h select.h selinfo.h sem.h sha1.h \ sha2.h shm.h siginfo.h signal.h signalvar.h sigtypes.h simplelock.h \ sleepq.h socket.h \ Index: src/sys/sys/bufq_impl.h diff -u src/sys/sys/bufq_impl.h:1.8 src/sys/sys/bufq_impl.h:1.9 --- src/sys/sys/bufq_impl.h:1.8 Mon Jan 19 14:54:28 2009 +++ src/sys/sys/bufq_impl.h Wed Nov 2 13:52:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bufq_impl.h,v 1.8 2009/01/19 14:54:28 yamt Exp $ */ +/* $NetBSD: bufq_impl.h,v 1.9 2011/11/02 13:52:34 yamt Exp $ */ /* NetBSD: bufq.h,v 1.3 2005/03/31 11:28:53 yamt Exp */ /* NetBSD: buf.h,v 1.75 2004/09/18 16:40:11 yamt Exp */ @@ -88,7 +88,7 @@ struct bufq_state { }; static __inline void *bufq_private(const struct bufq_state *) __unused; -static __inline int buf_inorder(const struct buf *, const struct buf *, int) +static __inline bool buf_inorder(const struct buf *, const struct buf *, int) __unused; #include <sys/null.h> /* for NULL */ @@ -102,11 +102,16 @@ bufq_private(const struct bufq_state *bu /* * Check if two buf's are in ascending order. + * + * this function consider a NULL buf is after any non-NULL buf. + * + * this function returns false if two are "same". */ -static __inline int +static __inline bool buf_inorder(const struct buf *bp, const struct buf *bq, int sortby) { + KASSERT(bp != NULL || bq != NULL); if (bp == NULL || bq == NULL) return (bq == NULL);