1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 23:41:18 +01:00
Marian Buschsieweke 646c8b46e6
cpu/native: move native hack from core here
CPU specific hacks never should go to `core`. This simplifies the hack
and moves it to `cpu/native` by providing a custom `sched.h` that adds
the workarounds for glibc and adds an `#include_next "sched.h"`.

It's a bit of a pity that RIOT's sched.h has a name conflict with
POSIX's sched.h - otherwise those hacks wouldn't really be needed.
2025-12-15 08:21:18 +01:00

26 lines
642 B
C

/*
* SPDX-FileCopyrightText: 2025 Marian Buschsieweke
* SPDX-License-Identifier: LGPL-2.1-only
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/* Inject some ugly workarounds needed for native on sched.h - the issue here
* is that RIOT's sched.h shadows POSIX's sched.h - which on glibc contains
* a type definition of cpu_set_t needed in a few other glibc headers. Since
* (portable) RIOT apps never will actually call any functions provided only
* on native, we don't really need to provide a meaningful definition here. */
#if __GLIBC__
typedef void cpu_set_t;
#endif
#ifdef __cplusplus
}
#endif
#include_next "sched.h"