1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

36 Commits

Author SHA1 Message Date
48b21f00c3 cpu: x86: remove obsolete hwtimer support 2015-09-16 10:58:53 +02:00
41dff1052e cpu: x86: remove obsolete hwtimer support 2015-09-16 10:58:52 +02:00
Martine Lenders
93f555ef69 Merge pull request #3782 from OlegHahm/RIOT_assert
core: RIOT's own assert macro
2015-09-12 13:12:34 +02:00
Oleg Hahm
f3245cecac core: panic: last instruction's address for assert 2015-09-11 23:23:31 +02:00
Oleg Hahm
d7161b6d4b cpu: inline function to print instruction register 2015-09-11 23:23:31 +02:00
Oleg Hahm
143d613307 x86: added missing panic function 2015-09-11 16:09:28 +02:00
fe594126e6 cpu: x86: remove obsolete uart0 code 2015-09-04 17:47:01 +02:00
ab863cf831 cpu: x86: remove obsolete uart0 header include 2015-09-04 17:46:23 +02:00
Joakim Gebart
53d81bd58d cpu/x86: rename stack_t -> stack_info_t
Avoids collision with libc defined stack_t in #include <sys/signal.h>
2015-07-13 19:57:55 +02:00
Hauke Petersen
a5e4b02ed8 cpu: fixed doxygen for multiple headers 2015-05-28 15:45:05 +02:00
Hauke Petersen
9943f51080 global: renamed cpu-conf.h into cpu_conf.h 2015-05-28 15:45:05 +02:00
Joakim Gebart
8b6308d89b x86: Remove atomic_set_return 2015-05-26 21:28:31 +02:00
Lucas Jenss
426170b064 Improve naming of thread stacksize/priority constants
As discussed in #2725, this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:

* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
2015-05-21 00:14:23 +02:00
Joakim Gebart
e9c567107d all: remove extra blank lines at the end 2015-05-09 09:10:08 +02:00
René Kijewski
96ca6a6bef x86: Add atomic_cas implementation 2015-05-07 18:52:13 +02:00
Joakim Gebart
215ccc1213 core: Introduce atomic counters
- Move generic implementation of atomic_set_return to core/atomic.c
 - Generic implementation of atomic compare and swap in core/atomic.c
 - atomic_cas is used to implement atomic counters in core/include/atomic.h
 - atomic_int_t is an atomic integer type
 - ATOMIC_INIT can be used as an initializer for atomic_int_t
 - ATOMIC_VALUE gets a reference to the value of an atomic integer
2015-05-07 18:52:13 +02:00
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>
00000000
???
</stack trace>
Halting.

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).
2015-04-02 19:27:17 -03:00
kushalsingh007
390e030f84 Removing the warnings after running static code analyser.
-Changes to fix all the clarifyCalulation warnings.
-Fixes a part of issue number 480
2015-03-10 04:08:43 +05:30
Oleg Hahm
43c86b5a3e doc: fix remaining doxygen warnings 2014-12-04 17:16:57 +01:00
Oleg Hahm
0ccf1043de doc: fixed broken doxygen references 2014-12-04 17:16:57 +01:00
Oleg Hahm
fc7606a94b doc: use doxygen li tags 2014-11-30 21:39:53 +01:00
Oleg Hahm
df9c09d946 doc: fixed typos and other misspellings 2014-11-30 21:32:12 +01:00
BytesGalore
a4d2ee307c cpu: added extern "C" to headers 2014-11-24 19:10:15 +01:00
Oleg Hahm
39abba1bc2 licenses: fix miss-spelled & missing boiler plates 2014-11-10 18:59:55 +01:00
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.
2014-10-24 00:09:56 +02:00
René Kijewski
427a5fbaef core: let valid PIDs start with 1 2014-08-17 19:51:03 +02:00
Oleg Hahm
1de5c2b4a0 fixed remaining variables to kernel_pid_t 2014-08-07 17:29:53 +02:00
Oleg Hahm
aa2ecf6216 initialize kernel_pid_t correctly 2014-08-07 16:31:27 +02:00
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.
2014-08-07 16:31:27 +02:00
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.
2014-08-01 12:02:54 +02:00
Ludwig Ortmann
bea563d1da Fix a few cppcheck findings 2014-07-25 08:17:06 +02:00
Hauke Petersen
9001e0c2fb core: removed duplicated hwtimer_arch.h 2014-07-09 21:08:13 +02:00
René Kijewski
ba1a15535b core: remove extra thread_create_arg() function 2014-07-09 10:28:23 +02:00
René Kijewski
867246a09f Add argument to thread_create 2014-07-09 10:07:54 +02:00
René Kijewski
abdb3ef2a4 x86: add read-before-write check at runtime
Finding read-before-writes statically is quite difficult. In native we
can use valgrind, but on boards without an MMU we are out of luck.

x86 has an MMU, let's use it.

If `-DDEBUG_READ_BEFORE_WRITE` was set, then pages on the heap get
initialized upon first use. If the page was read before written, then a
debug message with the virtual and physical address of the memory
location is printed, as well as the address of the offending instruction.
2014-05-31 19:45:19 +02:00
René Kijewski
4e4f908379 Initial import of the x86 port
Currently this works only in qemu.
2014-05-25 13:40:29 +02:00