Browse Source

core: fix osx compile issue

patch-1
smlng 6 years ago
parent
commit
0d4855c256
  1. 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…
Cancel
Save