apache / apache/nuttx

IMPROVED TASK START-UP AND SYSCALL RETURN

Open
#3,424 0 comments 0 reactions 0 assignees View on GitHub
Type: Migrated TODO
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

```
Description: Couldn't up_start_task and up_start_pthread syscalls be
eliminated. Wouldn't this work to get us from kernel-
to user-mode with a system trap:

lda r13, #address
str rn, [r13]
msr spsr_SVC, rm
ld r13,{r15}

Would also need to set r13_USER and r14_USER. For new
SYS_context_switch... couldn't we do he same thing?

Also... System calls use traps to get from user- to kernel-
mode to perform OS services. That is necessary to get from
user- to kernel-mode. But then another trap is used to get
from kernel- back to user-mode. It seems like this second
trap should be unnecessary. We should be able to do the
same kind of logic to do this.
Status: Open
Priority: Low-ish, but a good opportunity for performance improvement.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.