Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27111
b: refs/heads/master
c: 5cb38bc
h: refs/heads/master
i:
  27109: f6fce86
  27107: 81c72fa
  27103: 7e9d15e
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Jun 5, 2006
1 parent 8796f75 commit 6e8b1f6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65e62974a8a6157140259b26e7156e39f53031b6
refs/heads/master: 5cb38bc47bf370570fce81f89e05e5250169060f
13 changes: 2 additions & 11 deletions trunk/arch/um/include/kern_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,11 @@ extern int is_syscall(unsigned long addr);
extern void free_irq(unsigned int, void *);
extern int cpu(void);

extern void time_init_kern(void);

/* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */
extern int __cant_sleep(void);
extern void segv_handler(int sig, union uml_pt_regs *regs);
extern void sigio_handler(int sig, union uml_pt_regs *regs);

#endif

/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/
10 changes: 10 additions & 0 deletions trunk/arch/um/kernel/time_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ void timer_irq(union uml_pt_regs *regs)
}
}


void time_init_kern(void)
{
unsigned long long nsecs;

nsecs = os_nsecs();
set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION,
-nsecs % BILLION);
}

void do_boot_timer_handler(struct sigcontext * sc)
{
struct pt_regs regs;
Expand Down
10 changes: 1 addition & 9 deletions trunk/arch/um/os-Linux/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,12 @@ void uml_idle_timer(void)
set_interval(ITIMER_REAL);
}

extern void ktime_get_ts(struct timespec *ts);
#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)

void time_init(void)
{
struct timespec now;

if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR)
panic("Couldn't set SIGVTALRM handler");
set_interval(ITIMER_VIRTUAL);

do_posix_clock_monotonic_gettime(&now);
wall_to_monotonic.tv_sec = -now.tv_sec;
wall_to_monotonic.tv_nsec = -now.tv_nsec;
time_init_kern();
}

unsigned long long os_nsecs(void)
Expand Down

0 comments on commit 6e8b1f6

Please sign in to comment.