Add stack frame to panic

This commit is contained in:
ssimnb 2026-02-01 14:55:30 +01:00
parent b337e5193b
commit cfcb806ebf
16 changed files with 169 additions and 103 deletions

View file

@ -113,6 +113,8 @@ kstatus _ma_alloc_slab(struct ma_kcache *kcache){
}
}
//asm("int $1");
if(kcache->slabs_free == NULL){
kcache->slabs_free = slab_structure;
}else{
@ -127,8 +129,10 @@ kstatus _ma_alloc_slab(struct ma_kcache *kcache){
return KERNEL_STATUS_SUCCESS;
}
// fix this complicated POS
void _ma_move_slab(struct ma_slab *slab, enum SLAB_STATE newstate){
struct ma_kcache *cache = slab->cache;
struct ma_slab *sb = 0;
switch (newstate) {
@ -199,6 +203,10 @@ void _ma_move_slab(struct ma_slab *slab, enum SLAB_STATE newstate){
}
free_common:
slab->next = NULL;
slab->prev = NULL;
// Preserve the linkage
if(sb->prev != NULL){
if(sb->next != NULL){
@ -216,6 +224,10 @@ void _ma_move_slab(struct ma_slab *slab, enum SLAB_STATE newstate){
return;
partial_common:
slab->next = NULL;
slab->prev = NULL;
if(sb->prev != NULL){
if(sb->next != NULL){
sb->next->prev = sb->prev;
@ -232,6 +244,9 @@ void _ma_move_slab(struct ma_slab *slab, enum SLAB_STATE newstate){
return;
used_common:
slab->next = NULL;
slab->prev = NULL;
if(sb->prev != NULL){
if(sb->next != NULL){
sb->next->prev = sb->prev;