mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1264226: Don't use '_COARSE' Posix clocks if not defined, r=jld
Not all systems (i.e., Gonk) support CLOCK_MONOTONIC_COARSE and CLOCK_REALTIME_COARSE. With this patch, we don't refer to them if they are not supported.
This commit is contained in:
parent
251a87be0b
commit
e1b5ef463a
@ -145,10 +145,14 @@ public:
|
||||
case __NR_clock_gettime: {
|
||||
Arg<clockid_t> clk_id(0);
|
||||
return If(clk_id == CLOCK_MONOTONIC, Allow())
|
||||
#ifdef CLOCK_MONOTONIC_COARSE
|
||||
.ElseIf(clk_id == CLOCK_MONOTONIC_COARSE, Allow())
|
||||
#endif
|
||||
.ElseIf(clk_id == CLOCK_PROCESS_CPUTIME_ID, Allow())
|
||||
.ElseIf(clk_id == CLOCK_REALTIME, Allow())
|
||||
#ifdef CLOCK_REALTIME_COARSE
|
||||
.ElseIf(clk_id == CLOCK_REALTIME_COARSE, Allow())
|
||||
#endif
|
||||
.ElseIf(clk_id == CLOCK_THREAD_CPUTIME_ID, Allow())
|
||||
.Else(InvalidSyscall());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user