Changeset 597fa24 in mainline for kernel/generic/src/mm/frame.c
- Timestamp:
- 2025-04-09T16:19:40Z (6 days ago)
- Branches:
- master
- Children:
- 9f945464, a188131
- Parents:
- 3e7948c
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-09 16:08:09)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-09 16:19:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/frame.c
r3e7948c r597fa24 63 63 #include <proc/thread.h> /* THREAD */ 64 64 65 zones_t zones; 65 zones_t zones = { 66 .count = 0, 67 .lock = IRQ_SPINLOCK_INITIALIZER("frame.zones.lock"), 68 }; 66 69 67 70 /* … … 69 72 * available. 70 73 */ 71 static mutex_t mem_avail_mtx;72 static condvar_t mem_avail_cv;74 static MUTEX_INITIALIZE(mem_avail_mtx, MUTEX_ACTIVE); 75 static CONDVAR_INITIALIZE(mem_avail_cv); 73 76 static size_t mem_avail_req = 0; /**< Number of frames requested. */ 74 77 static size_t mem_avail_gen = 0; /**< Generation counter. */ … … 1108 1111 void frame_init(void) 1109 1112 { 1110 if (config.cpu_active == 1) {1111 zones.count = 0;1112 irq_spinlock_initialize(&zones.lock, "frame.zones.lock");1113 mutex_initialize(&mem_avail_mtx, MUTEX_ACTIVE);1114 condvar_initialize(&mem_avail_cv);1115 }1116 1117 1113 /* Tell the architecture to create some memory */ 1118 1114 frame_low_arch_init();
Note:
See TracChangeset
for help on using the changeset viewer.