URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 471 |
Rev 525 |
Line 285... |
Line 285... |
* been placed on the stack in the proper order.
|
* been placed on the stack in the proper order.
|
*
|
*
|
*********************************************************************************************************
|
*********************************************************************************************************
|
*/
|
*/
|
|
|
OS_STK *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
|
OS_STK *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos,
|
|
INT16U opt)
|
{
|
{
|
OS_STK *stk;
|
OS_STK *stk;
|
OS_STK *fp;
|
OS_STK *fp;
|
|
|
#ifdef DEBUG
|
#ifdef DEBUG
|
printf("\nCreating Stack at %x for task %x", ptos, task);
|
printf("\nCreating Stack at %x for task %x", ptos, task);
|
#endif
|
#endif
|
|
|
opt = opt; /* 'opt' is not used, prevent warning */
|
opt = opt; /* 'opt' is not used, prevent warning */
|
stk = ptos; /* Load stack pointer */
|
stk = ptos; /* Load stack pointer */
|
|
stk -=32; /* Skip over red zone, 32 words */
|
stk--;
|
stk--;
|
|
|
*stk-- = (OS_STK)(pdata); /* fp+0 -> parameter 0 */
|
*stk-- = (OS_STK)(pdata); /* fp+0 -> parameter 0 */
|
fp = stk;
|
fp = stk;
|
*stk-- = (OS_STK)fp; /* sp+4 -> previous fp */
|
*stk-- = (OS_STK)fp; /* sp+4 -> previous fp */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.