[pok-devel] Ocarina : patch to add a START call after every CREATE_PROCESS call |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/pok-devel Archives
]
Hello everybody
attached is a patch that adds a call to START after every call to CREATE_PROCESS in ocarina-generated arinc code.
as was discussed earlier these calls are mandatory for arinc threads which are not started when created (DELAYED_START can be used instead, but it is not currently implemented in pok and its use case is different)
I will wait for this patch to be applied/rejected before I move on to make arinc threads be created DORMANT in pok so things continue to work for everybody
please review and (if ok) apply
Regards
Jérémy Rosen
fight key loggers : write some perl using vim
Index: src/backends/ocarina-backends-pok_c-main.adb
===================================================================
--- src/backends/ocarina-backends-pok_c-main.adb (révision 5725)
+++ src/backends/ocarina-backends-pok_c-main.adb (copie de travail)
@@ -331,6 +331,17 @@
(POK_Make_Function_Call_With_Assert
(RF (RE_Create_Process), Parameters),
Statements);
+ Parameters := New_List(CTN.K_Parameter_List);
+ Append_Node_To_List ( Make_Array_Value
+ (Copy_Node (Process_Variable_Name),
+ CTU.Make_Literal
+ (CV.New_Int_Value (Thread_Id, 1, 10))),
+ Parameters);
+ Add_Return_Variable_In_Parameters(Parameters);
+ Append_Node_To_List
+ (POK_Make_Function_Call_With_Assert
+ (RF (RE_Start), Parameters),
+ Statements);
else
Append_Node_To_List
(POK_Make_Function_Call_With_Assert