diff options
| author | Keith Packard <keithp@keithp.com> | 2013-08-28 22:08:51 -0600 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-08-28 22:08:51 -0600 | 
| commit | 8e9ed70f50e3f535c2580820771bb1bc3cd055fe (patch) | |
| tree | 39d3eb0f0cf6016733f489ebc6ed6817e98105b4 /src | |
| parent | 2fa87754c5c11bb86e9b1878580c3d4f4b2463f5 (diff) | |
altos/stm: Make sampling profiler work again
Disable the separate stack as that means we can't figure out the PC
from the timer interrupt. Move ao_idle_loc after the interrupt release
so that we see idle tasks correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/stm/ao_arch_funcs.h | 15 | 
1 files changed, 11 insertions, 4 deletions
| diff --git a/src/stm/ao_arch_funcs.h b/src/stm/ao_arch_funcs.h index 6fe86e62..9bb2d7cd 100644 --- a/src/stm/ao_arch_funcs.h +++ b/src/stm/ao_arch_funcs.h @@ -338,6 +338,11 @@ static inline void ao_arch_restore_stack(void) {  	asm("bx lr");  } +#ifndef HAS_SAMPLE_PROFILE +#define HAS_SAMPLE_PROFILE 0 +#endif + +#if !HAS_SAMPLE_PROFILE  #define HAS_ARCH_START_SCHEDULER	1  static inline void ao_arch_start_scheduler(void) { @@ -350,15 +355,17 @@ static inline void ao_arch_start_scheduler(void) {  	control |= (1 << 1);  	asm("msr control,%0" : : "r" (control));  } +#endif  #define ao_arch_isr_stack()  #endif -#define ao_arch_wait_interrupt() do {			\ -		asm(".global ao_idle_loc\n\twfi\nao_idle_loc:");	\ -		ao_arch_release_interrupts();				\ -		ao_arch_block_interrupts();				\ +#define ao_arch_wait_interrupt() do {				\ +		asm("\twfi\n");					\ +		ao_arch_release_interrupts();			\ +		asm(".global ao_idle_loc\nao_idle_loc:");	\ +		ao_arch_block_interrupts();			\  	} while (0)  #define ao_arch_critical(b) do {				\ | 
