Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2018 10:00:09 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r341845 - stable/12/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201812121000.wBCA09gm097297@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Dec 12 10:00:09 2018
New Revision: 341845
URL: https://svnweb.freebsd.org/changeset/base/341845

Log:
  MFC r341517 and r341592:
  linuxkpi: implement idr_is_empty() and ida_is_empty().
  
  Submitted by:   kib@
  Sponsored by:   Mellanox Technologies

Modified:
  stable/12/sys/compat/linuxkpi/common/include/linux/idr.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/include/linux/idr.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/idr.h	Wed Dec 12 09:51:10 2018	(r341844)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/idr.h	Wed Dec 12 10:00:09 2018	(r341845)
@@ -122,7 +122,15 @@ void	ida_simple_remove(struct ida *ida, unsigned int i
 static inline int
 ida_get_new(struct ida *ida, int *p_id)
 {
+
 	return (ida_get_new_above(ida, 0, p_id));
+}
+
+static inline bool
+ida_is_empty(struct ida *ida)
+{
+
+	return (idr_is_empty(&ida->idr));
 }
 
 #endif	/* _LINUX_IDR_H_ */



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