Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
PolyORB-HI-C
Commits
ff874261
Commit
ff874261
authored
Jul 10, 2017
by
Jerome Hugues
Browse files
* Solve integration of VCD machinery
Follow-up to openaadl/ocarina#96
parent
ea07efa5
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/po_hi_utils.h
View file @
ff874261
...
...
@@ -19,21 +19,19 @@
*/
int
__po_hi_compute_miss
(
__po_hi_uint8_t
rate
);
unsigned
long
__po_hi_swap_byte
(
unsigned
long
value
);
#ifdef __PO_HI_USE_VCD
#include
<pthread.h>
#include
<string.h>
/* Variable keeping track of whether VCD tracing is enabled or not */
#ifdef __PO_HI_USE_VCD
enum
tagVCD
{
VCD_UNCHECKED
,
VCD_DISABLED
,
VCD_ENABLED
}
VCD_state
=
UNCHECKED
;
#endif
};
void
__po_hi_instrumentation_vcd_init
(
void
);
...
...
@@ -41,12 +39,12 @@ void __po_hi_instrumentation_vcd_init (void);
#define __PO_HI_INSTRUMENTATION_VCD_WRITE(s, args...) \
{ \
extern enum tagVCD VCD_state; \
if (VCD_state == VCD_UNCHECKED) { \
VCD_state = NULL == getenv("VCD_ENABLED")?VCD_DISABLED:VCD_ENABLED; \
} \
if (VCD_state == VCD_ENABLED) { \
extern int __po_hi_vcd_file; \
extern int __po_hi_vcd_init; \
extern __po_hi_time_t __po_hi_vcd_start_time; \
extern pthread_mutex_t __po_hi_vcd_mutex; \
__po_hi_time_t __po_hi_vcd_current_time; \
...
...
@@ -74,7 +72,7 @@ void __po_hi_instrumentation_vcd_init (void);
write (__po_hi_vcd_file, buf, size_to_write); \
} \
pthread_mutex_unlock (&__po_hi_vcd_mutex); \
}
}
\
}
#else
#define __PO_HI_INSTRUMENTATION_VCD_WRITE(s, args...)
...
...
src/po_hi_utils.c
View file @
ff874261
...
...
@@ -5,13 +5,14 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE.
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE.
*/
#include
<po_hi_config.h>
#include
<po_hi_time.h>
#include
<po_hi_types.h>
#include
<po_hi_debug.h>
#include
<po_hi_utils.h>
/* Header files in PolyORB-HI */
#include
<deployment.h>
...
...
@@ -19,6 +20,10 @@
#include
<stdlib.h>
#ifdef __PO_HI_USE_VCD
enum
tagVCD
VCD_state
;
#endif
int
__po_hi_compute_miss
(
__po_hi_uint8_t
rate
)
{
int
v
;
...
...
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