core: fix osx compile issue

This commit is contained in:
smlng 2017-02-01 09:06:48 +01:00
parent 9a3589dcfe
commit 0d4855c256
1 changed files with 8 additions and 2 deletions

View File

@ -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")))
#define FORCE_USED_SECTION __attribute__((used)) __attribute__((section (".openocd")))
uint8_t max_threads = sizeof(sched_threads) / sizeof(thread_t*);
/* OpenOCD can't determine struct offsets and additionally this member is only
* available if compiled with DEVELHELP */
__attribute__((used)) __attribute__((section (".openocd")))
uint8_t _tcb_name_offset = offsetof(thread_t, name);