1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20602 from maribu/cpu/msp430/get_caller_pc

cpu/msp430: implement get_caller_pc
This commit is contained in:
benpicco 2024-04-22 08:41:56 +00:00 committed by GitHub
commit 3cd83c7709
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,14 +20,12 @@
#ifndef CPU_H
#define CPU_H
#include <stdio.h>
#include <stdint.h>
#include <msp430.h>
#include "board.h"
#include "sched.h"
#include "thread.h"
#include "cpu_conf.h"
#ifdef __cplusplus
extern "C" {
@ -118,12 +116,11 @@ static inline void __attribute__((always_inline)) __exit_isr(void)
/**
* @brief Returns the last instruction's address
*
* @todo: Not supported
*/
__attribute__((always_inline))
static inline uintptr_t cpu_get_caller_pc(void)
{
return 0;
return (uintptr_t)__builtin_return_address(0);
}
#ifdef __cplusplus