Loading...
Searching...
No Matches
native_sched.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#ifdef CPU_NATIVE
30#include <stdio.h>
31
32#if __GLIBC__
33/*
34 * Required to use some C++11 headers with g++ on the native board.
35 */
36#define __CPU_SETSIZE 1024
37#define __NCPUBITS (8 * sizeof(__cpu_mask))
38typedef unsigned long int __cpu_mask;
39typedef struct {
40 __cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
41} cpu_set_t;
42#endif
43
47inline int sched_yield(void)
48{
49 puts("[ERROR] sched_yield called (defined in sched.h)\n");
50 return 0;
51}
52#else
59extern int sched_yield(void);
60#endif /* CPU_NATIVE */
61
62#ifdef __cplusplus
63}
64#endif
65
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.