]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Add do_setitimer prototype to linux/time.h
authorAndrew Morton <akpm@osdl.org>
Thu, 7 Aug 2003 04:14:37 +0000 (21:14 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 7 Aug 2003 04:14:37 +0000 (21:14 -0700)
From: Peter Chubb <peterc@gelato.unsw.edu.au>

Currently, do_setitimer() is used in several files, but doesn't appear
in any header.  Thus its declaration is repeated in some files, and
its use causes a warning in others (because there is no declaration
present).

This patch:
     -- adds a couple of declarations to linux/times.h
     -- removes the (now duplicate) declarations from other files.

arch/alpha/kernel/osf_sys.c
arch/mips/kernel/sysirix.c
arch/x86_64/ia32/sys_ia32.c
include/linux/time.h
kernel/compat.c
kernel/itimer.c
kernel/timer.c

index cce7e0d072500864b2202c293c66d583c7537271..bd0e69f0532e81c9b2077ab0198dfe67d36bad16 100644 (file)
@@ -821,8 +821,6 @@ osf_setsysinfo(unsigned long op, void *buffer, unsigned long nbytes,
    affects all sorts of things, like timeval and itimerval.  */
 
 extern struct timezone sys_tz;
-extern int do_getitimer(int which, struct itimerval *value);
-extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
 extern asmlinkage int sys_utimes(char *, struct timeval *);
 extern int do_adjtimex(struct timex *);
 
index 620fd87d72bc6a4cc26c31fc6bd0f52ee190b266..022aa036efef298a91d011a47982e124c45ead3c 100644 (file)
@@ -636,9 +636,6 @@ asmlinkage int irix_stime(int value)
        return 0;
 }
 
-extern int do_setitimer(int which, struct itimerval *value,
-                        struct itimerval *ovalue);
-
 static inline void jiffiestotv(unsigned long jiffies, struct timeval *value)
 {
        value->tv_usec = (jiffies % HZ) * (1000000 / HZ);
index a3f4c9708110c40ba545a8c81919d53209e96fed..e1150347f6d07f2786cf84b610a96806417ba045 100644 (file)
@@ -428,8 +428,6 @@ put_tv32(struct compat_timeval *o, struct timeval *i)
        return err; 
 }
 
-extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
-
 asmlinkage long
 sys32_alarm(unsigned int seconds)
 {
index 719b6b3647083c88baa5b55be48e8f94c5bf9b31..0a0fc40912ba91acb9a7ad8563f65d321c9115ab 100644 (file)
@@ -217,6 +217,9 @@ extern void clock_was_set(void); // call when ever the clock is set
 extern int do_posix_clock_monotonic_gettime(struct timespec *tp);
 extern long do_nanosleep(struct timespec *t);
 extern long do_utimes(char __user * filename, struct timeval * times);
+struct itimerval;
+extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
+extern int do_getitimer(int which, struct itimerval *value);
 
 static inline void
 set_normalized_timespec (struct timespec *ts, time_t sec, long nsec)
index de5820d09d71562a84bf502d97c7797149d8e62f..f5e1df8834b3ab9155298a29ded2b3c12862d7eb 100644 (file)
@@ -116,8 +116,6 @@ static inline long put_compat_itimerval(struct compat_itimerval *o,
                 __put_user(i->it_value.tv_usec, &o->it_value.tv_usec)));
 }
 
-extern int do_getitimer(int which, struct itimerval *value);
-
 asmlinkage long compat_sys_getitimer(int which, struct compat_itimerval *it)
 {
        struct itimerval kit;
@@ -129,8 +127,6 @@ asmlinkage long compat_sys_getitimer(int which, struct compat_itimerval *it)
        return error;
 }
 
-extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
-
 asmlinkage long compat_sys_setitimer(int which, struct compat_itimerval *in,
                struct compat_itimerval *out)
 {
index a544d4090d36c9061e56e959218c20f5ebd5bef1..1a95e09b41b62d1336e5d152a1bee33a032cd827 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/mm.h>
 #include <linux/smp_lock.h>
 #include <linux/interrupt.h>
+#include <linux/time.h>
 
 #include <asm/uaccess.h>
 
index 3995425e44a500f03b8b0dbb957a0560f008b33e..19e03ef778872ea2e36113c7aa75c07e814e4c25 100644 (file)
@@ -841,8 +841,6 @@ void do_timer(struct pt_regs *regs)
 
 #if !defined(__alpha__) && !defined(__ia64__)
 
-extern int do_setitimer(int, struct itimerval *, struct itimerval *);
-
 /*
  * For backwards compatibility?  This can be done in libc so Alpha
  * and all newer ports shouldn't need it.