po_hi_utils.h 869 Bytes
Newer Older
1
2
3
4
5
6
7
8
/*
 * This is a part of PolyORB-HI-C distribution, a minimal
 * middleware written for generated code from AADL models.
 * You should use it with the Ocarina toolsuite.
 *
 * For more informations, please visit http://ocarina.enst.fr
 *
 * Copyright (C) 2007-2009, GET-Telecom Paris.
9
 * Copyright (C) 2010, European Space Agency.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 */

#ifndef __PO_HI_UTILS_H__
#define __PO_HI_UTILS_H__

#include <po_hi_time.h>
#include <po_hi_types.h>

/*
 * Simulate the WCET of the task. It enters an infinite loop during a
 * random period chosen from the first and second argument.
 */
int __po_hi_simulate_wcet (__po_hi_time_t time1, __po_hi_time_t time2);

/*
 * Take a rate as argument, returns the probability that we meet this rate.
 */
int __po_hi_compute_miss (__po_hi_uint8_t rate);
28
29
30


unsigned long __po_hi_swap_byte (unsigned long value);
31
#endif /* __PO_HI_UTILS_H__ */