projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Keep valgrind happy when calling timer_create
[ghc-hetmet.git]
/
rts
/
posix
/
Itimer.c
diff --git
a/rts/posix/Itimer.c
b/rts/posix/Itimer.c
index
1fcfa16
..
a60f8f1
100644
(file)
--- a/
rts/posix/Itimer.c
+++ b/
rts/posix/Itimer.c
@@
-42,6
+42,8
@@
# include <signal.h>
#endif
# include <signal.h>
#endif
+#include <string.h>
+
/* Major bogosity:
*
* In the threaded RTS, we can't set the virtual timer because the
/* Major bogosity:
*
* In the threaded RTS, we can't set the virtual timer because the
@@
-143,6
+145,9
@@
initTicker (nat ms, TickProc handle_tick)
{
struct sigevent ev;
{
struct sigevent ev;
+ // Keep programs like valgrind happy
+ memset(&ev, 0, sizeof(ev));
+
ev.sigev_notify = SIGEV_SIGNAL;
ev.sigev_signo = ITIMER_SIGNAL;
ev.sigev_notify = SIGEV_SIGNAL;
ev.sigev_signo = ITIMER_SIGNAL;