1,5 → 1,5 |
/* |
* Copyright (C) 2005 Jakub Jermar |
* Copyright (C) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
32,6 → 32,45 |
#include <arch/types.h> |
#include <config.h> |
|
/** Set priority level low |
* |
* Enable interrupts and return previous |
* value of EE. |
*/ |
static inline pri_t cpu_priority_low(void) { |
pri_t v; |
__asm__ volatile ( |
"\n" |
: "=r" (v) |
); |
return v; |
} |
|
/** Set priority level high |
* |
* Disable interrupts and return previous |
* value of EE. |
*/ |
static inline pri_t cpu_priority_high(void) { |
pri_t v; |
__asm__ volatile ( |
"\n" |
: "=r" (v) |
); |
return v; |
} |
|
/** Restore priority level |
* |
* Restore EE. |
*/ |
static inline void cpu_priority_restore(pri_t pri) { |
__asm__ volatile ( |
"\n" |
: : "r" (pri) |
); |
} |
|
/* TODO: implement the real stuff */ |
static inline __address get_stack_base(void) |
{ |