From: Michael O'Reilly (oreillym@tartarus.uwa.edu.au)
Date: 06/23/92


From: oreillym@tartarus.uwa.edu.au (Michael O'Reilly)
Subject: Re: Ack!  Linux 0.96b + vm86 patches chokes hard
Date: 24 Jun 1992 02:49:05 GMT

jwaters@deepthought.unm.edu (Joe Waters) writes:
:Okay, well, our work on the MS/DOS emulator *HAD* been going fine -- I had just
: gotten color text modes and attributes working, but... I upgraded to linux
:0.96b and everything exploded... I *was* running linux 0.96a patchlevel 1 (the
: last one that I really thought I needed, for the X text-restore) plus the vm86
: patches... Well, the vm86 patches eat it hard on 0.96b -- Techs
: (techs@pioneer.unm.edu) says that they actually bomb out on the 0.96a
: patchlevel 2 patches. Well, I got all the patches to work with the cdiffs
: (mostly the code had changed so much from .96aPL1 to .96b that the diffs
: couldn't match context) but now there's another problem. Everything goes fine
: until the kernel compile gets to kernel/vm86.c, at which point in one routine
: it generates six or seven errors -- something about structure not defined:
: current->alarm ... I assume that somewhere between .96aPL1 and .96aPL2,
: alarm was removed from the current structure or whatever... Only thing, I

Yup. The alarm element was replaced with the itimer stuff. Instead of
useing alarm, use it_real_value. Cautions.
it_real_value is a delta. I.e. DON'T add jiffies to it before seting. If
you want an alarm in 15 jiffies, just do it_real_value = 15;
it_real_incr = 0;
(itimers have a value to reset it_real_value to when SIGALRM is kicked).

so instead of..
        current->alarm = delta + jiffies;
do.
        current->it_real_value = delta;
        current->it_real_incr = 0;
Note that there are 3 timers now. Real time, cpu time, and profil time.
: can't for the life of me where the "current" structure is defined in the
: kernel source (anybody know how to do a recursive-through-subdir GREP? :-) )

grep 'regexp' `find . -name '*.c'-print`

Justt FYI, the current struct is defined in include/linux/sched.h. The
struct is the 'task_struct'.

: or I'd just add it back in... Linus? Any ideas? Anybody happen to notice
: where struct current is defined? Our DOS emulator work is pretty much hosed
: until we can get a running kernel with vm86 support :-(

: Thanks, anybody, in advance...
: Joe

Michael.