Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
e738216b
Commit
e738216b
authored
Aug 05, 2009
by
Matthias Braun
Browse files
fix read from uninitialized memory
[r26318]
parent
d2c1b019
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/stat/stat_timing.c
View file @
e738216b
...
...
@@ -79,7 +79,8 @@ void timing_enter_max_prio(void)
if
(
res
<
0
)
return
;
new_scheduler
=
SCHED_FIFO
;
sched_params
.
sched_priority
=
sched_get_priority_max
(
new_scheduler
);
new_sched_params
=
sched_params
;
new_sched_params
.
sched_priority
=
sched_get_priority_max
(
new_scheduler
);
sched_setscheduler
(
0
,
new_scheduler
,
&
new_sched_params
);
if
(
res
<
0
)
return
;
...
...
ir/stat/stat_timing.h
View file @
e738216b
...
...
@@ -53,7 +53,7 @@ static __inline timing_ticks_t __timing_ticks(void) { __asm { rdtsc } }
typedef
struct
timeval
timing_ticks_t
;
#define timing_ticks(t) (gettimeofday(&(t), NULL))
#define timing_ticks_init(t)
((t).tv_sec = 0, (t).tv_usec = 0
)
#define timing_ticks_init(t)
memset((t), 0, sizeof(t)
)
/*
* This shamelessly stolen and modified from glibc's
...
...
ir/stat/statev.h
View file @
e738216b
...
...
@@ -62,7 +62,7 @@ extern int stat_ev_timer_sp;
extern
timing_ticks_t
stat_ev_timer_elapsed
[];
extern
timing_ticks_t
stat_ev_timer_start
[];
static
inline
__attribute__
((
unused
))
void
stat_ev_tim_push
(
void
)
{
static
inline
void
stat_ev_tim_push
(
void
)
{
timing_ticks_t
temp
;
int
sp
=
stat_ev_timer_sp
++
;
timing_ticks
(
temp
);
...
...
@@ -76,7 +76,7 @@ static inline __attribute__((unused)) void stat_ev_tim_push(void) {
timing_ticks
(
stat_ev_timer_start
[
sp
]);
}
static
inline
__attribute__
((
unused
))
void
stat_ev_tim_pop
(
const
char
*
name
)
{
static
inline
void
stat_ev_tim_pop
(
const
char
*
name
)
{
int
sp
;
timing_ticks_t
temp
;
timing_ticks
(
temp
);
...
...
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