Commit 835980c4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Add do_setitimer prototype to linux/time.h

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.
parent d8aceb1c
......@@ -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 *);
......
......@@ -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);
......
......@@ -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)
{
......
......@@ -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)
......
......@@ -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)
{
......
......@@ -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>
......
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment