Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
regression-suites
Commits
b32c67e4
Commit
b32c67e4
authored
Jan 17, 2018
by
Maxime Perrotin
Browse files
Keep original code from the test
parent
e6e98aa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
Try again
or
attach a new 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