kernel/slab: Simplify arguments of create_object_cache().

* alignment, cookie, constructor, destructor are rarely used
   (in fact constructors/destructors are never used at present.)

 * Add flags argument, this is more commonly used.

This allows a lot of the invocations of create_object_cache_etc
to be changed to invocations of just create_object_cache, simplifying
the code significantly.
This commit is contained in:
Augustin Cavalier
2025-01-27 12:51:12 -05:00
parent 84fb1209cd
commit 1be0d390db
16 changed files with 40 additions and 53 deletions
+1 -2
View File
@@ -43,8 +43,7 @@ extern "C" {
#endif
object_cache* create_object_cache(const char* name, size_t objectSize,
size_t alignment, void* cookie, object_cache_constructor constructor,
object_cache_destructor destructor);
uint32 flags);
object_cache* create_object_cache_etc(const char* name, size_t objectSize,
size_t alignment, size_t maxByteUsage, size_t magazineCapacity,
size_t maxMagazineCount, uint32 flags, void* cookie,