1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-21 12:44:33 +00:00

add DEFINE_IDR() for 6.18.21 drm

This commit is contained in:
jsg
2026-04-07 09:04:16 +00:00
parent 1b32fd23ab
commit 4d83098c9f

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: idr.h,v 1.8 2026/03/08 23:31:50 jsg Exp $ */
/* $OpenBSD: idr.h,v 1.9 2026/04/07 09:04:16 jsg Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
@@ -33,6 +33,11 @@ struct idr {
SPLAY_HEAD(idr_tree, idr_entry) tree;
};
#define DEFINE_IDR(name) \
struct idr name = { \
.tree = SPLAY_INITIALIZER(&name.idr.tree), \
}
void idr_init(struct idr *);
void idr_preload(unsigned int);
int idr_alloc(struct idr *, void *, int, int, gfp_t);