Thread API refactoring
Description
The thread API is not homogeneous to other module APIs. The usual APIs consists of these functions:
SOPC_ReturnStatus SOPC_Module_Initialize(void); /* One time init */
SOPC_ReturnStatus SOPC_Module_Clear(void);
SOPC_Object *SOPC_Object_Create(void);
SOPC_ReturnStatus SOPC_Object_Init(SOPC_Object *p);
SOPC_ReturnStatus SOPC_Object_Clear(SOPC_Object *p);
SOPC_ReturnStatus SOPC_Object_Delete(SOPC_Object **p);
SOPC_ReturnStatus SOPC_Object_Operation(SOPC_Object *p, ...);
For threads, there is no one-time initialization/clear, and there is no Clear
or _Delete
.
This complicates the FreeRTOS implementation of this module, mostly with SOPC_Thread_Join(Thread t);
which shall delete the Thread.
Fixing this problem may help #567 (closed).
Edited by Pierre-Antoine BRAMERET