FUCKYOU
This commit is contained in:
@@ -3,13 +3,16 @@
|
||||
#include <utsm/pckc.h>
|
||||
#include <utsm/process.h>
|
||||
#include <utsm/log.h>
|
||||
#include <utsm/config.h>
|
||||
|
||||
static utsm_segment_desc g_segments[UTSM_MAX_SEGMENTS];
|
||||
static u64 g_generation = 1;
|
||||
|
||||
void utsm_init(void) {
|
||||
log_info("[UTSM] segment table reset begin");
|
||||
for (u32 i = 0; i < UTSM_MAX_SEGMENTS; i++) {
|
||||
u32 max_seg = g_utsm_max_segments;
|
||||
if (max_seg > UTSM_MAX_SEGMENTS) max_seg = UTSM_MAX_SEGMENTS;
|
||||
for (u32 i = 0; i < max_seg; i++) {
|
||||
g_segments[i].state = UTSM_SEG_FREE;
|
||||
g_segments[i].generation = 1;
|
||||
}
|
||||
@@ -24,7 +27,7 @@ void utsm_init(void) {
|
||||
}
|
||||
|
||||
utsm_segment_desc *utsm_get_segment(u32 slot) {
|
||||
if (slot >= UTSM_MAX_SEGMENTS) {
|
||||
if (slot >= g_utsm_max_segments || slot >= UTSM_MAX_SEGMENTS) {
|
||||
return NULL;
|
||||
}
|
||||
return &g_segments[slot];
|
||||
|
||||
Reference in New Issue
Block a user