stack.c 989 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * File : stack.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2011-05-23 aozima first implementation for PIC32.
  13. */
  14. #include <rtthread.h>
  15. /**
  16. * @addtogroup Loogonson SoC3210
  17. */
  18. /*@{*/
  19. /**
  20. * This function will initialize thread stack
  21. *
  22. * @param tentry the entry of thread
  23. * @param parameter the parameter of entry
  24. * @param stack_addr the beginning stack address
  25. * @param texit the function will be called when thread exit
  26. *
  27. * @return stack address
  28. */
  29. rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter, rt_uint8_t *stack_addr, void *texit)
  30. {
  31. rt_uint32_t *stk;
  32. /* return task's current stack address */
  33. return (rt_uint8_t *)stk;
  34. }
  35. /*@}*/