Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
2.7.0-rc2
Toggle main menu visibility
Main Page
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
arch_inlines.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Intel Corporation
3
* Copyright (c) 2019 Stephanos Ioannidis <root@stephanos.io>
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef ZEPHYR_INCLUDE_ARCH_X86_ARCH_INLINES_H_
9
#define ZEPHYR_INCLUDE_ARCH_X86_ARCH_INLINES_H_
10
11
#ifndef _ASMLANGUAGE
12
13
#if defined(CONFIG_X86_64)
14
15
#include <
arch/x86/intel64/thread.h
>
16
#include <
kernel_structs.h
>
17
18
static
inline
struct
_cpu *
arch_curr_cpu
(
void
)
19
{
20
struct
_cpu *cpu;
21
22
__asm__
volatile
(
"movq %%gs:(%c1), %0"
23
:
"=r"
(cpu)
24
:
"i"
(offsetof(
x86_tss64_t
, cpu)));
25
26
return
cpu;
27
}
28
29
#endif
/* CONFIG_X86_64 */
30
31
#endif
/* !_ASMLANGUAGE */
32
33
#endif
/* ZEPHYR_INCLUDE_ARCH_X86_ARCH_INLINES_H_ */
arch_curr_cpu
static ALWAYS_INLINE _cpu_t * arch_curr_cpu(void)
Definition:
arch_inlines.h:17
thread.h
kernel_structs.h
x86_tss64
Definition:
thread.h:50
include
arch
x86
arch_inlines.h
Generated on Sun Oct 9 2022 09:21:56 for Zephyr API Documentation by
1.9.4