cyclic_function.c 1.09 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* Functions to be filled by the user (never overwritten by buildsupport tool) */

#include <stdio.h>

#ifdef REPORT_MALLOC
#include <malloc.h>
#endif

#include "cyclic_function.h"
#include <stdio.h>

void cyclic_function_startup() 
{
    printf ("[cyclic function] startup done\n");
}

void cyclic_function_PI_cyclic_activation()
{
	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
}