*BSD News Article 10494


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA205 ; Fri, 29 Jan 93 13:00:32 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!darwin.sura.net!udel!gatech!news.byu.edu!ux1!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: Scheme->C port report
Message-ID: <1993Jan28.180931.16193@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University  (Ogden, UT)
References: <1993Jan28.020308.151@netcom.com>
Date: Thu, 28 Jan 93 18:09:31 GMT
Lines: 73

In article <1993Jan28.020308.151@netcom.com> thinman@netcom.com (Technically Sweet) writes:
>Hi folks,
>
>I port the DEC Research Scheme-to-C compiler to bsd386.
>Scheme is a miniature version of LISP; this implementation
>has an interpreter and a compiler.  I use it a lot.
>
>I've got all of patchkit 0.2 installed except for the
>3-digit ones which are all dicey anyway.
>
>Problem #1: vmparam.h is not in /usr/include/sys.
>It's only off in the kernel sources.  s2c uses USRSTACK
>from that file.

/usr/include/sys is a symbolic link to the kernel stuff or vice versa,
depending on if you've manually changed your developement environment.
If nothing else, manually link it back.

>Problem #2: gcvt() and its friends ecvt & fcvt aren't
>in the math library.  These are double-to-string converters
>with more formatting control than sprintf gives.
>s2c runs on many platforms and they all have the ?cvt routines.

Several soloutions to this problem were posted here (comp.unix.bsd)
and should be available as back articles, from a news archive, or are
probably on ref.tfs.com.

>Problem #3: some of the floating point tests don't work.
>They do work on my at&t 386 system v.3.2 system.
>However, the latter is on a 486/33 and the bsd386 is
>on a 386/20 with an IIT 387-alike.

I can't speak for your "IIT 387-alike"... however, there was an article
posted on the 26th which dealt with the values in float.h.  This, in
combination with 4-5 patches to deal with rounding bits, etc. combined
should eliminate the FPU problems.  Someone is already working on a
"definitive patch" for this (*not* in patchkit format!) and said they'd
post when they were done.

>Problem #4: A memory allocation-thrasher program causes
>the kernel to reboot.  
>"vm_pagefault" gibberish - a few seconds of a message - reboot.
>I don't know enough to gdb the kernel.

You'll have to learn enough to gdb the kernel or tell us enough that
someone who can gdb the kernel can repeat it (no fast answer).

>And a question: Scheme does threads by copying around
>versions of the program stack.  Has anyone done a nice
>thread system for bsd386?  Don't mmap() and the signal
>stack allow you to do this?

Without mmap, you can do it with a package called "sigsched".  I would
not use signals for anything that had to be reliable until POSIX 1003.4,
when they are supposed to queue.

>Comments?

If you can write a threads package, the world will beat a path to your
door.


					Terry Lambert
					terry@icarus.weber.edu
					terry_lambert@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                        "I have an 8 user poetic license" - me
 Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------