gettimeofday: avoid per-cpu data in calculation
Because it is difficult to safely update per-cpu data of other cpus in settimeofday().
This commit is contained in:
@ -73,11 +73,6 @@ struct cpu_local_var {
|
||||
int in_interrupt;
|
||||
int no_preempt;
|
||||
int timer_enabled;
|
||||
|
||||
unsigned long tv_sec;
|
||||
unsigned long tv_nsec;
|
||||
unsigned long last_tsc;
|
||||
|
||||
} __attribute__((aligned(64)));
|
||||
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include <ihk/context.h>
|
||||
#include <ihk/memconst.h>
|
||||
#include <rlimit.h>
|
||||
#include <time.h>
|
||||
|
||||
#define NUM_SYSCALLS 255
|
||||
|
||||
@ -286,4 +287,9 @@ struct procfs_file {
|
||||
};
|
||||
|
||||
extern void terminate(int, int);
|
||||
|
||||
/* kernel/syscall.c */
|
||||
extern struct timespec origin_ts; /* realtime when tsc=0 */
|
||||
extern unsigned long clocks_per_sec;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user