forked from xuos/xiuos
Support O2 optimization
This commit is contained in:
@@ -49,7 +49,7 @@ Modification:
|
||||
#include "task.h"
|
||||
|
||||
extern void context_switch(struct context**, struct context*);
|
||||
void dabort_handler(struct trapframe* r)
|
||||
__attribute__((optimize("O0"))) void dabort_handler(struct trapframe* r)
|
||||
{
|
||||
if (r->pc >= DEV_VRTMEM_BASE && is_spinlock_hold_by_current_cpu(&whole_kernel_lock)) {
|
||||
assert(is_spinlock_hold_by_current_cpu(&whole_kernel_lock));
|
||||
@@ -69,7 +69,7 @@ void dabort_handler(struct trapframe* r)
|
||||
panic("dabort end should never be reashed.\n");
|
||||
}
|
||||
|
||||
void iabort_handler(struct trapframe* r)
|
||||
__attribute__((optimize("O0"))) void iabort_handler(struct trapframe* r)
|
||||
{
|
||||
if (r->pc >= DEV_VRTMEM_BASE && is_spinlock_hold_by_current_cpu(&whole_kernel_lock)) {
|
||||
assert(is_spinlock_hold_by_current_cpu(&whole_kernel_lock));
|
||||
|
||||
Reference in New Issue
Block a user