Re: having a hard time with 2.4.x

piatz
2001-02-07T21:23:27Z

While attempting to port Linux to a new platform using a compiler other
then GCC I noticed that there appears to be a volatile missing on the
declaration of xtime in include/linux/sched.h. The compiler I am using
considers this to be an error. The following may help your problem.

include/linux/sched.h
*** sched.h 2001/02/05 21:48:10 1.3
--- sched.h 2001/02/07 05:19:09
***************
*** 533,539 ****
extern unsigned long volatile jiffies;
extern unsigned long itimer_ticks;
extern unsigned long itimer_next;
! extern struct timeval xtime;
extern void do_timer(struct pt_regs *);

extern unsigned int * prof_buffer;
--- 533,539 ----
extern unsigned long volatile jiffies;
extern unsigned long itimer_ticks;
extern unsigned long itimer_next;
! extern volatile struct timeval xtime;
extern void do_timer(struct pt_regs *);

Ulrich Windl writes:
>
> Hello,
>
> I have some news on the topic of timekeeping in Linux-2.4:
>
> As Alan Cox pointed out the ACPI changes between 2.4.0 and 2.4.1 created a
> extremely slow console output (if not more). Configuring away ACPI support
> solved that problem.
>
> However there is still a problem that I cannot explain. I wrote a test program
> for my modified kernel (I did not try the original one). I'll include the
> program plus results (if you want to see the patch go to
> ftp.kernel.org/pub/linux/daemons/ntp/PPS and get PPS-2.4.0-pre3.tar.bz2 (patch
> plus signature)):
>
> #include <time.h>
> #include <stdio.h>
> #define NTP_NANO
> #include <sys/timex.h>
>
> int main()
> {
> struct timex tx;
> long lastns = 0;
>
> tx.modes = 0;
> while(1)
> {
> adjtimex(&tx);
> printf("%d %d %d\n",
> tx.time.tv_sec, tx.time.tv_nsec,
> tx.time.tv_nsec - lastns);
> lastns = tx.time.tv_nsec;
> fflush(stdout);
> }
> }

--
Steve Piatz piatz@cray.com
Cray Inc. 651-605-9049
1340 Mendota Heights Road
Mendota Heights, MN 55120
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/