Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
regression-suites
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
regression-suites
Commits
b32c67e4
Commit
b32c67e4
authored
Jan 17, 2018
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep original code from the test
parent
e6e98aa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
12 deletions
+61
-12
Demo_ContextParams/cyclic_function/cyclic_function.c
Demo_ContextParams/cyclic_function/cyclic_function.c
+44
-4
Demo_ContextParams/passive_function/passive_function.c
Demo_ContextParams/passive_function/passive_function.c
+17
-8
No files found.
Demo_ContextParams/cyclic_function/cyclic_function.c
View file @
b32c67e4
...
...
@@ -2,14 +2,54 @@
#include "cyclic_function.h"
void
cyclic_function_startup
()
#include <stdio.h>
#ifdef REPORT_MALLOC
#include <malloc.h>
#endif
#include "cyclic_function.h"
#include <stdio.h>
void
cyclic_function_startup
()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
printf
(
"[cyclic function] startup done
\n
"
);
}
void
cyclic_function_PI_cyclic_activation
()
{
/* Write your code here! */
static
asn1SccT_INTEGER
i
=
0
,
j
=
0
;
asn1SccT_INTEGER
result
=
0
;
asn1SccT_SEQUENCE
seq
;
seq
.
x
=
i
;
seq
.
y
=
j
;
#if WORD_SIZE==8
printf
(
"cycle: input i=%lld, j=%lld
\n
"
,
i
,
j
);
#else
printf
(
"cycle: input i=%ld, j=%ld
\n
"
,
i
,
j
);
#endif
cyclic_function_RI_compute_data
(
&
seq
,
&
result
);
#if WORD_SIZE==8
printf
(
" result of computation: %lld
\n
"
,
result
);
#else
printf
(
" result of computation: %ld
\n
"
,
result
);
#endif
i
++
;
j
++
;
#ifdef REPORT_MALLOC
printf
(
"Heap used so far:
\n
"
);
printf
(
"total space allocated from system: %d
\n
"
,
mallinfo
().
arena
);
printf
(
"total allocated space: %d
\n
"
,
mallinfo
().
uordblks
);
printf
(
"total non-inuse space: %d
\n
"
,
mallinfo
().
fordblks
);
#endif
#ifdef COVERAGE
__gcov_flush
();
#endif
}
Demo_ContextParams/passive_function/passive_function.c
View file @
b32c67e4
/* User code: This file will not be overwritten by TASTE. */
#include "passive_function.h"
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
/* Function static data is declared in this file : */
#include "passive_function.h"
#include "Context-passive-function.h"
#include <stdio.h>
void
passive_function_startup
()
void
passive_function_startup
()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
printf
(
"[passive_function] startup done
\n
"
);
}
void
passive_function_PI_compute_data
(
const
asn1SccT_SEQUENCE
*
IN_my_in
,
asn1SccT_INTEGER
*
OUT_result
)
void
passive_function_PI_compute_data
(
const
asn1SccT_SEQUENCE
*
IN_my_in
,
asn1SccT_INTEGER
*
OUT_result
)
{
/* Write your code here! */
*
OUT_result
=
IN_my_in
->
x
+
IN_my_in
->
y
;
// passive_function_ctxt.test1 = *OUT_result;
/* test1 is a context parameter */
// printf("test1 = %lld\n", passive_function_ctxt.test1);
printf
(
"test1 = %lld
\n
"
,
*
OUT_result
);
if
(
*
OUT_result
>
255
)
*
OUT_result
=
255
;
}
Write
Preview
Markdown
is supported
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