Commit b98b697d authored by Maxime Perrotin's avatar Maxime Perrotin

Use a protected interface to avoid race conditions

(How the hell could it work before?...)
parent 1b9a10eb
......@@ -74,6 +74,6 @@ PROPERTIES
Taste::coordinates => "0 0 2970 2100";
Taste::version => "1.3.17";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("~/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
Taste::HWLibraries => ("/home/taste/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
......@@ -125,7 +125,7 @@ FEATURES
};
RI_RunDriver : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::BlackBox::PI_RunDriver.others {
Taste::coordinates => "1302 384";
Taste::RCMoperationKind => unprotected;
Taste::RCMoperationKind => protected;
Taste::InterfaceName => "RunDriver";
Taste::labelInheritance => "true";
};
......@@ -146,7 +146,7 @@ SYSTEM BlackBox
FEATURES
PI_RunDriver : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::BlackBox::PI_RunDriver.others {
Taste::coordinates => "1872 494";
Taste::RCMoperationKind => unprotected;
Taste::RCMoperationKind => protected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "RunDriver";
......@@ -175,7 +175,7 @@ FEATURES
};
RI_RunDriver : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::BlackBox::PI_RunDriver.others {
Taste::coordinates => "1338 1189";
Taste::RCMoperationKind => unprotected;
Taste::RCMoperationKind => protected;
Taste::InterfaceName => "RunDriver";
Taste::labelInheritance => "true";
};
......
......@@ -24,6 +24,7 @@ package body caller_in_ada is
---------------------------------------------------------
procedure pulse is
begin
System.IO.Put_Line ("[Ada] Calling in Ada");
RunDriver(i1, i2, o1, o2);
system.io.put("[Ada] i1=");
......
......@@ -12,6 +12,7 @@ void caller_in_c_PI_pulse()
{
static asn1SccMyInteger i1=0, i2=1, o1, o2;
printf("[C] Calling in C\n");
caller_in_c_RI_RunDriver(&i1, &i2, &o1, &o2);
printf ("[C] i1 = %lld, i2 = %lld, o1 = %lld, o2 = %lld", i1,i2,o1,o2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment