RISC-V tasks now context switching to each other using taskYIELD() - not fully tested yet.

This commit is contained in:
Richard Barry 2018-09-27 17:25:17 +00:00
parent 2bcb1ab02b
commit e3dc5e934b
3 changed files with 121 additions and 106 deletions

View file

@ -70,7 +70,7 @@ not need to be guarded with a critical section. */
/* Scheduler utilities. */
#define portYIELD() { volatile uint32_t * const ulSoftInterrupt = ( uint32_t * ) 0x2000000; *ulSoftInterrupt = 1UL; }
#define portYIELD() { volatile uint32_t * const ulSoftInterrupt = ( uint32_t * ) configCTRL_BASE; *ulSoftInterrupt = 1UL; }
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) vPortYield()
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
/*-----------------------------------------------------------*/