arch: Return directly when arch not support interrupt context save
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
parent
20faf08930
commit
f48693eaf5
@ -25,6 +25,8 @@
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
#include "ceva_internal.h"
|
||||
@ -51,6 +53,14 @@ int up_saveusercontext(void *saveregs)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* TODO: save interrupt context */
|
||||
|
||||
memset(saveregs, 0x0, XCPTCONTEXT_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Let sys_call1() do all of the work */
|
||||
|
||||
ret = sys_call1(SYS_save_context, (uintptr_t)saveregs);
|
||||
|
@ -23,6 +23,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
@ -46,5 +49,13 @@
|
||||
|
||||
int up_saveusercontext(void *saveregs)
|
||||
{
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* TODO: save interrupt context */
|
||||
|
||||
memset(saveregs, 0x0, XCPTCONTEXT_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sys_call1(SYS_save_context, (uintptr_t)saveregs);
|
||||
}
|
||||
|
@ -23,6 +23,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
@ -46,5 +49,13 @@
|
||||
|
||||
int up_saveusercontext(void *saveregs)
|
||||
{
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* TODO: save interrupt context */
|
||||
|
||||
memset(saveregs, 0x0, XCPTCONTEXT_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sys_call1(SYS_save_context, (uintptr_t)saveregs);
|
||||
}
|
||||
|
@ -23,6 +23,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
@ -46,5 +49,13 @@
|
||||
|
||||
int up_saveusercontext(void *saveregs)
|
||||
{
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* TODO: save interrupt context */
|
||||
|
||||
memset(saveregs, 0x0, XCPTCONTEXT_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sys_call1(SYS_save_context, (uintptr_t)saveregs);
|
||||
}
|
||||
|
@ -23,6 +23,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
@ -46,5 +49,13 @@
|
||||
|
||||
int up_saveusercontext(void *saveregs)
|
||||
{
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* TODO: save interrupt context */
|
||||
|
||||
memset(saveregs, 0x0, XCPTCONTEXT_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sys_call1(SYS_save_context, (uintptr_t)saveregs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user