projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8469440
)
Use throwErrnoIfMinus1_ when calling getrusage
author
Ian Lynagh
<igloo@earth.li>
Fri, 10 Jul 2009 20:42:21 +0000
(20:42 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 10 Jul 2009 20:42:21 +0000
(20:42 +0000)
System/CPUTime.hsc
patch
|
blob
|
history
diff --git
a/System/CPUTime.hsc
b/System/CPUTime.hsc
index
cb23d93
..
2dbc896
100644
(file)
--- a/
System/CPUTime.hsc
+++ b/
System/CPUTime.hsc
@@
-91,7
+91,7
@@
getCPUTime = do
--
#if defined(HAVE_GETRUSAGE) && ! irix_HOST_OS && ! solaris2_HOST_OS
allocaBytes (#const sizeof(struct rusage)) $ \ p_rusage -> do
--
#if defined(HAVE_GETRUSAGE) && ! irix_HOST_OS && ! solaris2_HOST_OS
allocaBytes (#const sizeof(struct rusage)) $ \ p_rusage -> do
- getrusage (#const RUSAGE_SELF) p_rusage
+ throwErrnoIfMinus1_ "getrusage" $ getrusage (#const RUSAGE_SELF) p_rusage
let ru_utime = (#ptr struct rusage, ru_utime) p_rusage
let ru_stime = (#ptr struct rusage, ru_stime) p_rusage
let ru_utime = (#ptr struct rusage, ru_utime) p_rusage
let ru_stime = (#ptr struct rusage, ru_stime) p_rusage