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

46 Commits

Author SHA1 Message Date
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
Benjamin Valentin
453a8be4f3 sys/cpp_new_delete: always enable the module when C++ is used 2024-02-07 11:40:23 +01:00
Frederik Haxel
394cd0e3a8 sys: 64 bit compatibility
* priority_queue_t: Replaced `-1U` literal with PRIORITY_QUEUE_DATA_SIGNALING define
* architecture.h: Added 64-bit
* bloom.h: Fixed typedef for the hashfp_t function pointer
* vfs.h: Increased default vfs buffer sizes for 64 bit
* bytes.h: Check if socklen_t is already defined
* ztimer: Use PRIxPTR format specifier
2024-01-17 16:05:12 +01:00
Marian Buschsieweke
edc43201db
tree-wide: fix typos in doc and comments
This should not change any generated binary
2023-10-16 12:17:48 +02:00
Marian Buschsieweke
76347a83d7
sys/cpp11-compat: fix compilation with clang++ 2023-07-18 12:24:08 +02:00
16b2606bac
sys/cpp11-compat: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:50 +02:00
Karl Fessel
da17ebbde7 sys /cpp11-compat: remove pseudo anonymous namespaces 2023-04-18 16:30:43 +02:00
Karl Fessel
90d2ae83fb cpp11-compat: thread::sleep_for in microseconds 2023-04-17 13:27:14 +02:00
MrKevinWeiss
4f6448ed05
sys/cpp11-compat: Use ztimer64_usec instead of xtimer 2023-03-24 12:36:45 +01:00
MrKevinWeiss
54c4bd56ca
sys/cpp11-compat: Fix kconfig model 2022-08-16 10:57:26 +02:00
Marian Buschsieweke
8be03dc055
core: implement core_mutex_mitigate_priority_inversion 2022-08-05 13:08:52 +02:00
1db89df391
sys: add Kconfig support for cpp11-compat module 2022-04-24 21:23:34 +02:00
Gunar Schorcht
20dfe40330 sys: remove -std=c++11 2022-01-13 17:50:59 +01:00
Gunar Schorcht
3e2de3590e sys/cpp11-compat: add deleted operators required by C++14 2022-01-06 11:18:33 +01:00
Gunar Schorcht
9ec52361d1 sys/cpp11_compat: move __dso_handle to sys/cpp_new_delete
On ARM platforms, `__dso_handle` is used for dynamic shared objects. But it is also required if global static objects are used. To avoid that `sys/cpp11_compat` is required only for using the (re)defined `new`/`delete` operators, `__dso_handle` is moved to module `sys/cpp_new_delete`
2022-01-06 09:50:29 +01:00
Gunar Schorcht
eaf3a4c81a sys/cpp11-compat: use new/delete from sys/cpp_new_delete
The `new` and `delete` operators that don't need `libtsdc++` are also provided by module `sys/cpp_new_delete` for platforms that don't have the `libstdc++`. Since these operators in `sys/cpp11-compat` are just wrappers for standard `malloc`/`free` functions like in `sys/cpp_new_delete`, the `new`/`delete` operators that don't need `libstdc++` are used from `sys/cpp_new_delete`. Only the `new`/`delete` operators that require the `libstd++` are left in `sys/cpp11-compat`.
  So it is sufficient for the use of the (re)defined `new`/`delete` operators that an application uses the module `sys/cpp_new_delete` instead of `sys/cpp11-compat` and thus also works on platforms without `libstdc++`.
2022-01-06 09:50:14 +01:00
Jens Wetterich
a0930a8ec0 doc: Improve C++ documentation
Move C++ modules in a new menu tree and improve the description.
2021-12-15 18:58:23 +01:00
Marian Buschsieweke
3b6fa61829
sys: Cleanup access to internal variables
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:

1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
   functions
2020-08-24 20:28:11 +02:00
2127b94a7b sys/cpp11-compat: fix typos 2019-11-23 22:39:37 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
JulianHolzwarth
1d65b36402 sys/cpp11-compat/thread.cpp: remove cast to int 2019-10-15 21:22:42 +02:00
Marian Buschsieweke
4c3e92f183
core: Made thread state an enum
- Introduced enum type `thread_state_t` to replace preprocessor macros
- Moved thread states to `sched.h` for two reasons:
  a) Because of the interdependencies of `sched.h` and `thread.h` keeping it in
     `thread.h` would result in ugly code.
  b) Theses thread states are defined from the schedulers point of view, so it
     actually makes senses to have it defined there
2019-02-13 13:31:52 +01:00
smlng
1ed6f84992 doc: fix whitespaces 2017-09-06 08:49:05 +02:00
Hauke Petersen
b9992c34f6 s adapted doc 2017-05-18 14:53:03 +02:00
Hauke Petersen
647efa02be sys/cpp11-compat: fixed doxygen warnings 2017-05-18 10:01:12 +02:00
Joseph Noir
93770edce4 cpp11-compat: address cppcheck warnings 2017-04-14 14:36:15 +02:00
Joseph Noir
27297bb640 doc: fix and update cpp11 compat doxygen 2017-03-10 14:56:48 +01:00
Cenk Gündoğan
3365bd8a23 cpp11-compat: no exceptions in noexcept function 2016-11-07 16:38:53 +01:00
Joakim Nohlgård
92370e846d sys/cpp11-compat: Add braces around mutex initializer
Fixes Clang warning/error:

    In file included from .../riot/sys/cpp11-compat/thread.cpp:26:
    In file included from .../riot/sys/cpp11-compat/include/riot/thread.hpp:39:
    .../riot/sys/cpp11-compat/include/riot/mutex.hpp:47:45: error:
     suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
      inline constexpr mutex() noexcept : m_mtx{0} {}
                                                ^
                                                {}
    1 error generated.
2016-06-01 16:21:18 +02:00
3f021d4db6 sys: cpp11-compat: add missing priority_queue.h include 2016-04-10 02:32:46 +02:00
3d9020eb46 sys: cpp11-compat: adapt to changed mutex implementation 2016-03-29 21:50:18 +02:00
kYc0o
f92b025b85 vtimer: get rid of 2016-03-24 17:10:54 +01:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
0bf305e0e7 sys: cpp11-compat: adapt to thread.h 2016-03-05 18:20:17 +01:00
2b010b5337 core: rename tcb_t -> thread_t, move into thread.h 2016-03-05 18:20:17 +01:00
9082273746 core: header cleanup 2016-02-28 22:46:28 +01:00
Hauke Petersen
41979b64cd sys: adapted to renamed THREAD FLAGS 2015-12-07 22:09:47 +01:00
BytesGalore
529e83675e cpp11: switched to use xtimer
Also switched the syscalls of cpu/native to use xtimer, only at _gettimeofday()
2015-11-27 18:36:25 +01:00
Joakim Nohlgård
98c465008b all: Update @gebart family name, email 2015-09-20 13:47:39 +02:00
Oleg Hahm
e2639d7f83 core: use enums for panic 2015-09-04 16:14:35 +02:00
Joakim Gebart
0a11d79e9d sys/cpp11-compat: chrono: remove unused include cstdio 2015-08-08 14:44:41 +02:00
Joakim Gebart
d670d6eb51 sys/cpp11-compat: condition variable: fix includes 2015-08-08 14:44:41 +02:00
Joakim Gebart
248fb1c6c0 sys/cpp11-compat: Add C++ runtime helpers
cppsupport.cpp contains functions which are necessary in order to use
some features of the C++ language, e.g. calling static constructors or
virtual functions.

TODO/Not implemented yet:
 - Test virtual functions
 - Handle exceptions (stack unwinding)
 - Run time type identification (RTTI)
2015-08-08 14:44:41 +02:00
Joakim Gebart
13832d8e62 everything: Remove filename from @file Doxygen command 2015-05-22 07:34:41 +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
Joseph Noir
bddaee751d Add replacement headers for thread, mutex and cond
These headers do not provide full stl functionality,
but a small subset:
* thread and this_thread
* condition_variable (some timed functions are missing)
* mutex, lock_guard and unique_lock
2015-05-18 13:57:02 +02:00