Re: Can't compile mol: ucontext redefined


Subject: Re: Can't compile mol: ucontext redefined
From: Samuel Rydh (samuel@ibrium.se)
Date: Sat Mar 17 2001 - 09:15:38 MST


On Fri, Mar 16, 2001 at 10:28:46PM +0100, Jens Schmalzing wrote:
> Hi,
>
> David H. Wagner writes:
>
> > Entering '/usr/src/redhat/BUILD/mol/emulation'
> > gcc -pipe -O3 -Wall -I/usr/src/redhat/BUILD/mol/sinclude -I./include
> > -I../include -msoft-float -c -o obj/main.o main.c
> > In file included from main.c:49:
> > /usr/include/asm/ucontext.h:6: redefinition of `struct ucontext'
> > make[1]: *** [obj/main.o] Error 1
> > make: *** [_subdir_emulation] Error 2
>
> I simply removed the `#include <asm/ucontext.h>'-line from the file.
> Also, I had to add `#include <stdarg.h>'-lines to several files where
> it was complaining about undefined va_-stuff. Unfortunately, mol
> still freezes with MacOS 9.1, so I'll have to wait for further updates
> anyway.
>

I've pushed the fix, it should now compile cleanly (it will
some hours before the rsync image is updated from the
bitkeeper tree).

Regarding 9.1, I'm pretty sure I know what causes the freeze
- the DEC and timebase registers get slightly out of sync which
causes the kernel code to (occasionally) return bad gettimeofday()
stamps. In particular, if MOL runs in X-mode this might
cause a freeze (was this the case here?).

Due to modifications in MacOS 9.1, there are currently
*a lot* more context switches between MOL and linux
then there used to be (about a factor 1000). This
exercises the timer problem.

As a workaround, I'm currently trying to fix some things
in the MMU which will reduce the number of context switches
in 9.1 (this will also remove the difference in MOL performance
between 9.0 and 9.1).

/Samuel

----------------------------------------------------------
 E-mail <samuel@ibrium.se> WWW: <http://www.ibrium.se>
  Phone/fax: (home) +46 8 4418431, (work) +46 8 7908470
----------------------------------------------------------



This archive was generated by hypermail 2a24 : Sat Mar 17 2001 - 09:18:42 MST