Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc47a0d1 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

[PATCH] uml: time initialization tidying



user_time_init_skas and user_time_init_tt were essentially the same.  So, this
merges them, deleting the mode-specific functions and declarations.

Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 026549d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -8,11 +8,11 @@


extern void timer(void);
extern void timer(void);
extern void switch_timers(int to_real);
extern void switch_timers(int to_real);
extern void set_interval(int timer_type);
extern void idle_sleep(int secs);
extern void idle_sleep(int secs);
extern void enable_timer(void);
extern void enable_timer(void);
extern void disable_timer(void);
extern void disable_timer(void);
extern unsigned long time_lock(void);
extern unsigned long time_lock(void);
extern void time_unlock(unsigned long);
extern void time_unlock(unsigned long);
extern void user_time_init(void);


#endif
#endif
+2 −2
Original line number Original line Diff line number Diff line
@@ -4,10 +4,10 @@
#
#


obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \
obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \
	syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o \
	syscall_kern.o syscall_user.o tlb.o trap_user.o uaccess.o \


subdir- := util
subdir- := util


USER_OBJS := process.o time.o
USER_OBJS := process.o


include arch/um/scripts/Makefile.rules
include arch/um/scripts/Makefile.rules
+0 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,6 @@ extern unsigned long exec_fp_regs[];
extern unsigned long exec_fpx_regs[];
extern unsigned long exec_fpx_regs[];
extern int have_fpx_regs;
extern int have_fpx_regs;


extern void user_time_init_skas(void);
extern void sig_handler_common_skas(int sig, void *sc_ptr);
extern void sig_handler_common_skas(int sig, void *sc_ptr);
extern void halt_skas(void);
extern void halt_skas(void);
extern void reboot_skas(void);
extern void reboot_skas(void);

arch/um/kernel/skas/time.c

deleted100644 → 0
+0 −30
Original line number Original line Diff line number Diff line
/* 
 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
 * Licensed under the GPL
 */

#include <sys/signal.h>
#include <sys/time.h>
#include "time_user.h"
#include "process.h"
#include "user.h"

void user_time_init_skas(void)
{
        if(signal(SIGALRM, (__sighandler_t) alarm_handler) == SIG_ERR)
                panic("Couldn't set SIGALRM handler");
 	if(signal(SIGVTALRM, (__sighandler_t) alarm_handler) == SIG_ERR)
 		panic("Couldn't set SIGVTALRM handler");
	set_interval(ITIMER_VIRTUAL);
}

/*
 * 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:
 */
+14 −17
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ void timer(void)
	timeradd(&xtime, &local_offset, &xtime);
	timeradd(&xtime, &local_offset, &xtime);
}
}


void set_interval(int timer_type)
static void set_interval(int timer_type)
{
{
	int usec = 1000000/hz();
	int usec = 1000000/hz();
	struct itimerval interval = ((struct itimerval) { { 0, usec },
	struct itimerval interval = ((struct itimerval) { { 0, usec },
@@ -45,12 +45,7 @@ void set_interval(int timer_type)


void enable_timer(void)
void enable_timer(void)
{
{
	int usec = 1000000/hz();
	set_interval(ITIMER_VIRTUAL);
	struct itimerval enable = ((struct itimerval) { { 0, usec },
							{ 0, usec }});
	if(setitimer(ITIMER_VIRTUAL, &enable, NULL))
		printk("enable_timer - setitimer failed, errno = %d\n",
		       errno);
}
}


void disable_timer(void)
void disable_timer(void)
@@ -155,13 +150,15 @@ void idle_sleep(int secs)
	nanosleep(&ts, NULL);
	nanosleep(&ts, NULL);
}
}


/*
/* XXX This partly duplicates init_irq_signals */
 * Overrides for Emacs so that we follow Linus's tabbing style.

 * Emacs will notice this stuff at the end of the file and automatically
void user_time_init(void)
 * adjust the settings for this buffer only.  This must remain at the end
{
 * of the file.
	set_handler(SIGVTALRM, (__sighandler_t) alarm_handler,
 * ---------------------------------------------------------------------------
		    SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH,
 * Local variables:
		    SIGALRM, SIGUSR2, -1);
 * c-file-style: "linux"
	set_handler(SIGALRM, (__sighandler_t) alarm_handler,
 * End:
		    SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH,
 */
		    SIGVTALRM, SIGUSR2, -1);
	set_interval(ITIMER_VIRTUAL);
}
Loading