mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 10:08:33 -04:00
MicroBlaze demo nearly working - death tasks not yet integrated - still a work in progress.
This commit is contained in:
parent
57653ee0ea
commit
cdac2c4f82
9 changed files with 48 additions and 19 deletions
|
@ -195,3 +195,15 @@ xList * pxList;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vlistGET_OWNER_OF_NEXT_ENTRY( void *pxTCB, xList *pxList )
|
||||
{
|
||||
xList * const pxConstList = ( pxList );
|
||||
/* Increment the index to the next item and return the item, ensuring */
|
||||
/* we don't return the marker used at the end of the list. */
|
||||
( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext;
|
||||
if( ( pxConstList )->pxIndex == ( xListItem * ) &( ( pxConstList )->xListEnd ) )
|
||||
{
|
||||
( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext;
|
||||
}
|
||||
( pxTCB ) = ( pxConstList )->pxIndex->pvOwner;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,8 @@ volatile unsigned portBASE_TYPE uxCriticalNesting = portINITIAL_NESTING_VALUE;
|
|||
|
||||
/* To limit the amount of stack required by each task, this port uses a
|
||||
separate stack for interrupts. */
|
||||
unsigned long *pulISRStack;
|
||||
unsigned long ulISRStack;
|
||||
unsigned long *pulISRStack = &ulISRStack;
|
||||
|
||||
/* The instance of the interrupt controller used by this port. */
|
||||
static XIntc xInterruptControllerInstance;
|
||||
|
@ -176,7 +177,7 @@ const unsigned long ulR13 = ( unsigned long ) &_SDA_BASE_;
|
|||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) pxCode; /* R14 - return address for interrupt. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) 0x0f; /* R15 - return address for subroutine. */
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) NULL; /* R15 - return address for subroutine. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) 0x10; /* R16 - return address for trap (debugger). */
|
||||
pxTopOfStack--;
|
||||
|
@ -225,14 +226,15 @@ const unsigned long ulR13 = ( unsigned long ) &_SDA_BASE_;
|
|||
portBASE_TYPE xPortStartScheduler( void )
|
||||
{
|
||||
extern void ( vPortStartFirstTask )( void );
|
||||
extern unsigned long *_stack;
|
||||
extern unsigned long _stack[];
|
||||
|
||||
/* Setup the hardware to generate the tick. Interrupts are disabled when
|
||||
this function is called. */
|
||||
vApplicationSetupTimerInterrupt();
|
||||
|
||||
/* Allocate the stack to be used by the interrupt handler. */
|
||||
pulISRStack = _stack;
|
||||
pulISRStack = ( unsigned long * ) _stack;
|
||||
pulISRStack--;
|
||||
|
||||
/* Restore the context of the first task that is going to run. From here
|
||||
on, the created tasks will be executing. */
|
||||
|
|
|
@ -1529,8 +1529,15 @@ signed portBASE_TYPE xReturn;
|
|||
prvLockQueue( pxQueue );
|
||||
if( pxQueue->uxMessagesWaiting == ( unsigned portBASE_TYPE ) 0U )
|
||||
{
|
||||
/* There is nothing in the queue, block for the specified period. */
|
||||
vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
||||
/* There is nothing in the queue, block for the specified period,
|
||||
provided the period is not zero. This guards against the case
|
||||
where the time to wake is set to zero because there are no active
|
||||
timers, but the tick count value also happens to be zero - creating
|
||||
a block time of zero which confuses the logic. */
|
||||
if( 1 )//_RB_if( xTicksToWait != 0U ) //_RB_ This should not be needed as the scheduler is suspended so the tick count cannot increment.
|
||||
{
|
||||
vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
||||
}
|
||||
}
|
||||
prvUnlockQueue( pxQueue );
|
||||
}
|
||||
|
|
|
@ -1792,7 +1792,7 @@ portTickType xTimeToWake;
|
|||
designed for use by kernel code, and has special calling requirements -
|
||||
it should be called from a critical section. */
|
||||
|
||||
|
||||
|
||||
/* Place the event list item of the TCB in the appropriate event list.
|
||||
In this case it is assume that this is the only task that is going to
|
||||
be waiting on this event list, so the faster vListInsertEnd() function
|
||||
|
|
|
@ -311,6 +311,8 @@ portBASE_TYPE xListWasEmpty;
|
|||
/* Just to avoid compiler warnings. */
|
||||
( void ) pvParameters;
|
||||
|
||||
vTaskDelay( 2 );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Query the timers list to see if it contains any timers, and if so,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue