Changes in kernel/generic/src/mm/reserve.c [19c8030:8d308b9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/reserve.c
r19c8030 r8d308b9 42 42 #include <typedefs.h> 43 43 #include <arch/types.h> 44 #include <debug.h>45 46 static bool reserve_initialized = false;47 44 48 45 IRQ_SPINLOCK_STATIC_INITIALIZE_NAME(reserve_lock, "reserve_lock"); … … 57 54 { 58 55 reserve = frame_total_free_get(); 59 reserve_initialized = true;60 56 } 61 57 … … 71 67 { 72 68 bool reserved = false; 73 74 ASSERT(reserve_initialized);75 69 76 70 irq_spinlock_lock(&reserve_lock, true); … … 117 111 void reserve_force_alloc(size_t size) 118 112 { 119 if (!reserve_initialized)120 return;121 122 113 irq_spinlock_lock(&reserve_lock, true); 123 114 reserve -= size; … … 131 122 void reserve_free(size_t size) 132 123 { 133 if (!reserve_initialized)134 return;135 136 124 irq_spinlock_lock(&reserve_lock, true); 137 125 reserve += size;
Note:
See TracChangeset
for help on using the changeset viewer.