mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
core: fix osx compile issue
This commit is contained in:
parent
9a3589dcfe
commit
0d4855c256
10
core/sched.c
10
core/sched.c
@ -58,13 +58,19 @@ clist_node_t sched_runqueues[SCHED_PRIO_LEVELS];
|
||||
static uint32_t runqueue_bitcache = 0;
|
||||
|
||||
/* Needed by OpenOCD to read sched_threads */
|
||||
__attribute__((used)) __attribute__((section (".openocd")))
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#define FORCE_USED_SECTION __attribute__((used)) __attribute__((section ("__OPENOCD,__openocd")))
|
||||
#else
|
||||
#define FORCE_USED_SECTION __attribute__((used)) __attribute__((section (".openocd")))
|
||||
#endif
|
||||
|
||||
FORCE_USED_SECTION
|
||||
uint8_t max_threads = sizeof(sched_threads) / sizeof(thread_t*);
|
||||
|
||||
#ifdef DEVELHELP
|
||||
/* OpenOCD can't determine struct offsets and additionally this member is only
|
||||
* available if compiled with DEVELHELP */
|
||||
__attribute__((used)) __attribute__((section (".openocd")))
|
||||
FORCE_USED_SECTION
|
||||
uint8_t _tcb_name_offset = offsetof(thread_t, name);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user