lwip operating system abstraction layer implementation based on CMSIS-RTOS
Dependents: LwIPNetworking NetServicesMin EthernetInterface EthernetInterface_RSF ... more
Revision 5:5ca31173e0aa, committed 2012-07-16
- Comitter:
- donatien
- Date:
- Mon Jul 16 14:46:19 2012 +0000
- Parent:
- 4:dd37867293e7
- Child:
- 6:2ace1ff71ae6
- Commit message:
- Fixed sys_arch.c for compatibility with mbed-rtos rev. 1 +; If you need to stick to using mbed-rtos rev. 0 do NOT update or the compilation will fail
Changed in this revision
arch/sys_arch.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/arch/sys_arch.c Fri Jul 06 08:55:22 2012 +0000 +++ b/arch/sys_arch.c Mon Jul 16 14:46:19 2012 +0000 @@ -443,8 +443,12 @@ #ifdef CMSIS_OS_RTX t->def.pthread = (os_pthread)thread; t->def.tpriority = (osPriority)priority; - t->def.instances = 1; t->def.stacksize = stacksize; + t->def.stack_pointer = (unsigned char*) malloc(stacksize); //Note DG: I don't think that malloc is always thread-safe, this could lead to memory corruption in some cases + if (t->def.stack_pointer == NULL) + { + error("Error allocating the stack memory"); + } #endif t->id = osThreadCreate(&t->def, arg); if (t->id == NULL)