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:
NAKAMURA Gou
2015-10-15 15:16:10 +09:00
parent cad72a8562
commit 153a59a6f4
4 changed files with 43 additions and 41 deletions

View File

@ -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)));

View File

@ -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