Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
cpu.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2013 - 2016 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
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
25
#ifndef CPU_H
26
#define CPU_H
27
28
#include <stdint.h>
29
#include <stdio.h>
30
#include "
cpu_conf.h
"
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
36
/* MARK: - Basics */
45
#define CPU_HAS_UNALIGNED_ACCESS
46
50
__attribute__((always_inline))
static
inline
uintptr_t
cpu_get_caller_pc
(
void
)
51
{
52
/* __builtin_return_address will return the address the calling function
53
* will return to - since cpu_get_caller_pc is forced inline,
54
* it is the return address of the user of this function */
55
return
(uintptr_t)__builtin_return_address(0);
56
}
59
#ifdef __cplusplus
60
}
61
#endif
62
63
#endif
/* CPU_H */
cpu_get_caller_pc
static uinttxtptr_t cpu_get_caller_pc(void)
Get the last instruction's address.
Definition
cpu.h:141
cpu_conf.h
Native CPU configuration.
Generated on Thu Apr 17 2025 22:37:25 by
1.12.0