Loading...
Searching...
No Matches
native_sched.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#ifdef CPU_NATIVE
27#include <stdio.h>
28
29#if __GLIBC__
30/*
31 * Required to use some C++11 headers with g++ on the native board.
32 */
33#define __CPU_SETSIZE 1024
34#define __NCPUBITS (8 * sizeof(__cpu_mask))
35typedef unsigned long int __cpu_mask;
36typedef struct {
37 __cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
38} cpu_set_t;
39#endif
40
44inline int sched_yield(void)
45{
46 puts("[ERROR] sched_yield called (defined in sched.h)\n");
47 return 0;
48}
49#else
56extern int sched_yield(void);
57#endif /* CPU_NATIVE */
58
59#ifdef __cplusplus
60}
61#endif
62
This module a wrapper for the stdio.h header intended to remove all calls to stdout when stdio_null i...
int sched_yield(void)
Compilation with g++ may require the declaration of this function.