Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
25
#ifdef __cplusplus
26
extern
"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))
38
typedef
unsigned
long
int
__cpu_mask;
39
typedef
struct
{
40
__cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
41
} cpu_set_t;
42
#endif
43
47
inline
int
sched_yield
(
void
)
48
{
49
puts(
"[ERROR] sched_yield called (defined in sched.h)\n"
);
50
return
0;
51
}
52
#else
59
extern
int
sched_yield
(
void
);
60
#endif
/* CPU_NATIVE */
61
62
#ifdef __cplusplus
63
}
64
#endif
65
sched_yield
int sched_yield(void)
Compilation with g++ may require the declaration of this function.
Generated on Tue Apr 15 2025 19:07:07 by
1.9.1