Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
buildsupport
Commits
03a7f660
Commit
03a7f660
authored
Jun 22, 2016
by
Maxime Perrotin
Browse files
Fix Ada wrappers to cope with the new filtering of PI callers
parent
289fe2d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
c/ada_wrappers_backend.c
View file @
03a7f660
...
@@ -561,67 +561,68 @@ void add_RI_to_ada_wrappers(Interface * i)
...
@@ -561,67 +561,68 @@ void add_RI_to_ada_wrappers(Interface * i)
i
->
parent_fv
->
name
,
// fv->name should be replaced by the namespace (not supported 15/07/2009) (used to be aplc)
i
->
parent_fv
->
name
,
// fv->name should be replaced by the namespace (not supported 15/07/2009) (used to be aplc)
i
->
parent_fv
->
name
,
i
->
name
);
i
->
parent_fv
->
name
,
i
->
name
);
}
}
}
else
{
// Current FV = Passive function
}
else
{
// Current FV = Passive function
fprintf
(
b
,
"
\t
begin
\n
"
);
fprintf
(
b
,
"
\t
begin
\n
"
);
fprintf
(
b
,
fprintf
(
b
,
"
\t\t
-- This function is passive, thus not have direct access to the VM
\n
"
);
"
\t\t
-- This function is passive, thus not have direct access to the VM
\n
"
);
fprintf
(
b
,
fprintf
(
b
,
"
\t\t
-- It must use its calling thread to invoke this asynchronous RI
\n\n
"
);
"
\t\t
-- It must use its calling thread to invoke this asynchronous RI
\n\n
"
);
/* ForEachWithParam element of i->parent_fv->calling_threads,
/* ForEachWithParam element of i->parent_fv->calling_threads,
execute CountFV and update & count thanks;*/
execute CountFV and update & count thanks;*/
/* Count the number of calling threads */
/* Count the number of calling threads */
FOREACH
(
ct
,
FV
,
i
->
parent_fv
->
calling_threads
,
{
if
(
NULL
==
i
->
calling_pis
)
calltmp
=
i
->
parent_fv
->
calling_threads
;
(
void
)
ct
;
else
{
count
++
;
FOREACH
(
calling_pi
,
Interface
,
i
->
calling_pis
,
{
})
FOREACH
(
thread_caller
,
FV
,
calling_pi
->
calling_threads
,
{
ADD_TO_SET
(
FV
,
calltmp
,
thread_caller
);
if
(
1
==
count
)
{
});
fprintf
(
b
,
"
\t\t
%s_async_ri_wrappers.vm_%s_vt"
,
});
i
->
parent_fv
->
calling_threads
->
value
->
name
,
i
->
name
);
if
(
NULL
!=
i
->
in
)
{
// Add parameters
fprintf
(
b
,
"("
);
FOREACH
(
p
,
Parameter
,
i
->
in
,
{
List_Ada_Param_Names
(
p
,
&
b
);
})
fprintf
(
b
,
")"
);
}
}
fprintf
(
b
,
";
\n
"
);
FOREACH
(
ct
,
FV
,
calltmp
,
{
}
else
if
(
count
>
1
)
{
(
void
)
ct
;
fprintf
(
b
,
"
\t\t
case callinglist.get_top_value is
\n
"
);
count
++
;
calltmp
=
i
->
parent_fv
->
calling_threads
;
});
while
(
NULL
!=
calltmp
)
{
fprintf
(
b
,
"
\t\t\t
when %d => %s_async_ri_wrappers.vm_%s_vt"
,
calltmp
->
value
->
thread_id
,
calltmp
->
value
->
name
,
i
->
name
);
if
(
NULL
!=
i
->
in
)
{
// Add parameters
fprintf
(
b
,
"("
);
FOREACH
(
p
,
Parameter
,
i
->
in
,
{
List_Ada_Param_Names
(
p
,
&
b
);
})
fprintf
(
b
,
")"
);
if
(
1
==
count
)
{
fprintf
(
b
,
"
\t\t
%s_async_ri_wrappers.vm_%s_vt"
,
calltmp
->
value
->
name
,
i
->
name
);
if
(
NULL
!=
i
->
in
)
{
// Add parameters
fprintf
(
b
,
"("
);
FOREACH
(
p
,
Parameter
,
i
->
in
,
{
List_Ada_Param_Names
(
p
,
&
b
);
});
fprintf
(
b
,
")"
);
}
}
fprintf
(
b
,
";
\n
"
);
fprintf
(
b
,
";
\n
"
);
calltmp
=
calltmp
->
next
;
}
}
fprintf
(
b
,
"
\t\t\t
when others => null;
\n
"
);
else
if
(
count
>
1
)
{
fprintf
(
b
,
"
\t\t
end case;
\n
"
);
fprintf
(
b
,
"
\t\t
case callinglist.get_top_value is
\n
"
);
FOREACH
(
caller
,
FV
,
calltmp
,
{
fprintf
(
b
,
"
\t\t\t
when %d => %s_async_ri_wrappers.vm_%s_vt"
,
caller
->
thread_id
,
caller
->
name
,
i
->
name
);
if
(
NULL
!=
i
->
in
)
{
// Add parameters
fprintf
(
b
,
"("
);
FOREACH
(
p
,
Parameter
,
i
->
in
,
{
List_Ada_Param_Names
(
p
,
&
b
);
});
fprintf
(
b
,
")"
);
}
fprintf
(
b
,
";
\n
"
);
});
fprintf
(
b
,
"
\t\t\t
when others => null;
\n
"
);
fprintf
(
b
,
"
\t\t
end case;
\n
"
);
}
}
}
}
}
}
else
{
else
{
int
cnt
=
0
;
int
cnt
=
0
;
FOREACH
(
t
,
FV
,
i
->
parent_fv
->
calling_threads
,
{
FOREACH
(
t
,
FV
,
i
->
parent_fv
->
calling_threads
,
{
(
void
)
t
;
(
void
)
t
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment