Module Name: src
Committed By: riastradh
Date: Mon Aug 27 07:15:06 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/include/linux: idr.h
Log Message:
Add ida_simple_remove.
Same as ida_remove for us. Linux requires caller to handle locking
for ida_remove (so it works with RCU) and ida_simple_remove just uses
a global lock where for users that aren't performance-critical. If
we ever pserialized idr, we'd have to do the same.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/linux/idr.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/external/bsd/drm2/include/linux/idr.h
diff -u src/sys/external/bsd/drm2/include/linux/idr.h:1.5 src/sys/external/bsd/drm2/include/linux/idr.h:1.6
--- src/sys/external/bsd/drm2/include/linux/idr.h:1.5 Mon Aug 27 06:55:01 2018
+++ src/sys/external/bsd/drm2/include/linux/idr.h Mon Aug 27 07:15:06 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: idr.h,v 1.5 2018/08/27 06:55:01 riastradh Exp $ */
+/* $NetBSD: idr.h,v 1.6 2018/08/27 07:15:06 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -117,4 +117,12 @@ ida_simple_get(struct ida *ida, unsigned
return id;
}
+static inline void
+ida_simple_remove(struct ida *ida, unsigned int id)
+{
+
+ KASSERT((int)id >= 0);
+ ida_remove(ida, id);
+}
+
#endif /* _LINUX_IDR_H_ */