Replaced CACHE_DONT_SLEEP by two new flags CACHE_DONT_WAIT_FOR_MEMORY and

CACHE_DONT_LOCK_KERNEL_SPACE. If the former is given, the slab memory manager
does not wait when reserving memory or pages. The latter prevents area
operations. The new flags add a bit of flexibility. E.g. when allocating page
mapping objects for userland areas CACHE_DONT_WAIT_FOR_MEMORY is sufficient,
i.e. the allocation will succeed as long as pages are available.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35246 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-01-22 21:19:23 +00:00
parent 86a0da42a5
commit 8d1316fd23
10 changed files with 64 additions and 42 deletions
+8 -7
View File
@@ -14,16 +14,17 @@
enum {
/* create_object_cache_etc flags */
CACHE_NO_DEPOT = 1 << 0,
CACHE_UNLOCKED_PAGES = 1 << 1,
CACHE_LARGE_SLAB = 1 << 2,
CACHE_NO_DEPOT = 1 << 0,
CACHE_UNLOCKED_PAGES = 1 << 1,
CACHE_LARGE_SLAB = 1 << 2,
/* object_cache_alloc flags */
CACHE_DONT_SLEEP = 1 << 8,
/* object_cache_{alloc,free}() flags */
CACHE_DONT_WAIT_FOR_MEMORY = 1 << 8,
CACHE_DONT_LOCK_KERNEL_SPACE = 1 << 9,
/* internal */
CACHE_ALIGN_ON_SIZE = 1 << 30,
CACHE_DURING_BOOT = 1 << 31
CACHE_ALIGN_ON_SIZE = 1 << 30,
CACHE_DURING_BOOT = 1 << 31
};
struct ObjectCache;