remove cmsg task, send_messages not called bugfix
[cor.git] / lib / memregion.c
blob77c85b5251da57a18576b3c0ba96eaf39c0dcc99
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* identifiers for device / performance-differentiated memory regions */
3 #include <linux/idr.h>
4 #include <linux/types.h>
6 static DEFINE_IDA(memregion_ids);
8 int memregion_alloc(gfp_t gfp)
10 return ida_alloc(&memregion_ids, gfp);
12 EXPORT_SYMBOL(memregion_alloc);
14 void memregion_free(int id)
16 ida_free(&memregion_ids, id);
18 EXPORT_SYMBOL(memregion_free);