Commit Graph

11 Commits (084db19107aafe084cf6ff0d8d3e950a82303b9a)

Author SHA1 Message Date
Joakim Nohlgård b02e0eca47 ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 7 years ago
Kaspar Schleiser c3f7186d4e unify usage of inline assembly 7 years ago
DipSwitch 0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 7 years ago
Kaspar Schleiser 9082273746 core: header cleanup 7 years ago
Kaspar Schleiser 05a572eb58 cpu: x86: remove obsolete dINT/eINT 7 years ago
José Roberto de Souza 684b081a16 x86: fix FPU lazy swap
The ucontext->x86_fxsave is initialize as 512 bytes of zeros, but it
is not a valid value to be set onto FPU registers, causing a General
Protection Fault:

Interrupt 0x0d (General Protection Fault) while handling 0x07 (Device not available)
EAX=0012f4c0  ECX=001336e4  EDX=001334ac  EBX=001336e0
ESP=00123784  EBP=001237c8  ESI=00000200  EDI=00000000
Error code=00000000
CR0=80010031  CR2=00000000  CR3=0012d000  CR4=000001e0
EIP=0000:80010031  EFLAGS=0012d000
<stack trace>
</stack trace>

So lets copy the initial state of FPU registers before FPU is used
and set it as the initial state of FPU to new threads(coroutine).
8 years ago
René Kijewski 677d690e2b core: introduce thread_yield_higher(), yield less
Fixes #1708.

Currently involuntary preemption causes the current thread not only to
yield for a higher prioritized thread, but all other threads of its own
priority class, too.

This PR adds the function `thread_yield_higher()`, which will yield the
current thread in favor of higher prioritized functions, but not for
threads of its own priority class.

Boards now need to implement `thread_yield_higher()` instead of
`thread_yield()`, but `COREIF_NG` boards are not affected in any way.

`thread_yield()` retains its old meaning: yield for every thread that
has the same or a higher priority.

This PR does not touch the occurrences of `thread_yield()` in the periph
drivers, because the author of this PR did not look into the logic of
the various driver implementations.
9 years ago
Oleg Hahm c2b0423918 core: renamed KERNEL_PID_NULL to KERNEL_PID_UNDEF
As @authmillenon pointed out the "null" in the old name is somewhat
misleading, since the actual value is -1.
9 years ago
Oleg Hahm 983d056c75 core: harmonizes the data type for the process ID
Instead of using differing integer types use kernel_pid_t for process
identifier. This type is introduced in a new header file to avoid
circular dependencies.
9 years ago
René Kijewski 867246a09f Add argument to thread_create 9 years ago
René Kijewski 4e4f908379 Initial import of the x86 port
Currently this works only in qemu.
9 years ago