From: Darren Senn (sinster@dana.ucsc.edu)
Date: 06/08/92


From: sinster@dana.ucsc.edu (Darren Senn)
Subject: Re: Problem with 0.96a Patch1 + Patch2
Date: 9 Jun 1992 00:47:33 GMT

In article <1992Jun8.205908.20273@klaava.Helsinki.FI>, torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) writes:
> In article <1992Jun8.120946@banner.ucsc.edu> sinster@scintilla.capitola.ca.us writes:
> >What? What about itimer.c? There should be _two_ files called itimer.c.
> >One is lib/itimer.c (this is the library interface to itimers) and the
> >other is kernel/itimer.c (this actually implements the itimers).
> >
> >Is there something odd about the patch?
>
> Yes, there is something odd about the patch - lib/itimer.c isn't there.
> It's not really needed (it's not really kernel code at all), and the
> only problem is that the lib/Makefile mentions it. I didn't really look
> through the patch when I made it...

Ah. Well, I found the file very handy for writing my own code that uses
the itimers. So if anyone's interested, here's the file lib/itimer.c that
I submitted to Linus. As he mentioned, you don't really need it to make
the kernel, but it's handy to turn into a library that you can use to
link with your programs.

[Lars will be very interested to note that I have a line here that's longer ]
[than 80 characters. :) ]

============= 8< ============= Cut here ================ 8< ==============
/*
 * linux/lib/itimer.c
 *
 * (C) 1992 Darren Senn
 */

#define __LIBRARY__
#include <unistd.h>
#include <sys/time.h>

_syscall2(int,getitimer,int,which,struct itimerval *,value)
_syscall3(int,setitimer,int,which,struct itimerval *,value,struct itimerval *,ovalue)
============= 8< ============= Cut here ================ 8< ==============