diff options
author | 2019-05-13 16:23:15 +0000 | |
---|---|---|
committer | 2019-05-13 16:23:15 +0000 | |
commit | bda5b86f35ded8eb2175e6248f93e9c2e85e0aad (patch) | |
tree | b0a4322eeac1e8d78d5d66e6bf0d63ff8877f1d4 | |
parent | ephermal -> ephemeral (diff) | |
download | wireguard-openbsd-bda5b86f35ded8eb2175e6248f93e9c2e85e0aad.tar.xz wireguard-openbsd-bda5b86f35ded8eb2175e6248f93e9c2e85e0aad.zip |
add idr_is_empty()
-rw-r--r-- | sys/dev/pci/drm/include/linux/idr.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/linux/idr.h b/sys/dev/pci/drm/include/linux/idr.h index cebbad8a3f9..501a89577fa 100644 --- a/sys/dev/pci/drm/include/linux/idr.h +++ b/sys/dev/pci/drm/include/linux/idr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: idr.h,v 1.1 2019/04/14 10:14:53 jsg Exp $ */ +/* $OpenBSD: idr.h,v 1.2 2019/05/13 16:23:15 jsg Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * @@ -45,6 +45,11 @@ void *idr_get_next(struct idr *, int *); #define idr_for_each_entry(idp, entry, id) \ for (id = 0; ((entry) = idr_get_next(idp, &(id))) != NULL; id++) +static inline bool +idr_is_empty(const struct idr *idr) +{ + return SPLAY_EMPTY(&idr->tree); +} struct ida { int counter; |