Changeset 9f945464 in mainline for kernel/generic/src/mm/frame.c
- Timestamp:
- 2025-04-09T16:36:30Z (6 days ago)
- Children:
- 3acb63b5
- Parents:
- 2c94501 (diff), 597fa24 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Wayne Thornton <wmthornton-dev@…> (2025-04-09 16:36:30)
- git-committer:
- GitHub <noreply@…> (2025-04-09 16:36:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/frame.c
r2c94501 r9f945464 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.