mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/msp430: implement get_caller_pc
This "implements" the `get_caller_pc()` function by simply wiring up compiler intrinsics.
This commit is contained in:
parent
ad9d50163e
commit
f01fb53529
@ -20,14 +20,12 @@
|
|||||||
#ifndef CPU_H
|
#ifndef CPU_H
|
||||||
#define CPU_H
|
#define CPU_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <msp430.h>
|
#include <msp430.h>
|
||||||
#include "board.h"
|
|
||||||
|
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "cpu_conf.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -118,12 +116,11 @@ static inline void __attribute__((always_inline)) __exit_isr(void)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the last instruction's address
|
* @brief Returns the last instruction's address
|
||||||
*
|
|
||||||
* @todo: Not supported
|
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline uintptr_t cpu_get_caller_pc(void)
|
static inline uintptr_t cpu_get_caller_pc(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return (uintptr_t)__builtin_return_address(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
Reference in New Issue
Block a user