Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
22
#ifdef __cplusplus
23
extern
"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))
35
typedef
unsigned
long
int
__cpu_mask;
36
typedef
struct
{
37
__cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
38
} cpu_set_t;
39
#endif
40
44
inline
int
sched_yield
(
void
)
45
{
46
puts(
"[ERROR] sched_yield called (defined in sched.h)\n"
);
47
return
0;
48
}
49
#else
56
extern
int
sched_yield
(
void
);
57
#endif
/* CPU_NATIVE */
58
59
#ifdef __cplusplus
60
}
61
#endif
62
sched_yield
int sched_yield(void)
Compilation with g++ may require the declaration of this function.
Generated on Tue Nov 25 2025 22:57:43 by
1.9.1