ast@cs.vu.nl (Andy Tanenbaum) (07/18/88)
: This is a shar archive. Extract with sh, not csh.
: This archive ends with exit, so do not worry about trailing junk.
: --------------------------- cut here --------------------------
PATH=/bin:/usr/bin:/usr/ucb
echo Extracting 'amoeba.h'
sed 's/^X//' > 'amoeba.h' << '+ END-OF-FILE ''amoeba.h'
X/****************************************************************************/
X/* */
X/* (c) Copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands */
X/* */
X/* This product is part of the Amoeba distributed operating system. */
X/* */
X/* Permission to use, sell, duplicate or disclose this software must be */
X/* obtained in writing. Requests for such permissions may be sent to */
X/* */
X/* */
X/* Dr. Andrew S. Tanenbaum */
X/* Dept. of Mathematics and Computer Science */
X/* Vrije Universiteit */
X/* Postbus 7161 */
X/* 1007 MC Amsterdam */
X/* The Netherlands */
X/* */
X/****************************************************************************/
X
X/*
X** If the host operating system for amoeba transactions is not amoeba
X** then several things may need to be done to make the amoeba code
X** compatible. These are provided in host_os.h.
X*/
X#include "host_os.h"
X
X#define PORTSIZE 6
X#define OOBSIZE 20
X#define HEADERSIZE 32
X#define PRIVSIZE 10
X#define CAPSIZE 16
X
X#define FAIL ((unshort) -1)
X#define NOTFOUND ((unshort) -2)
X#define BADADDRESS ((unshort) -3)
X#define ABORTED ((unshort) -4)
X#define TRYAGAIN ((unshort) -5)
X
X#define sizeoftable(t) (sizeof(t) / sizeof((t)[0]))
X
X#define NILPORT ((port *) 0)
X#define NILBUF ((bufptr) 0)
X
X#define _FP(p) ((struct _fakeport *) (p))
X#ifndef lint
X#define PortCmp(p, q) (_FP(p)->_p1==_FP(q)->_p1 && _FP(p)->_p2==_FP(q)->_p2)
X#define NullPort(p) (_FP(p)->_p1==0L && _FP(p)->_p2==0)
X#else
X#define PortCmp(p, q) ((p)->_portbytes[0] == (q)->_portbytes[0])
X#define NullPort(p) ((p)->_portbytes[0] == 0)
X#endif
X
Xtypedef char *bufptr;
X#ifndef MAX_BLOCK_NR
Xtypedef unsigned short unshort;
X#endif
Xtypedef char *event_t;
X
Xtypedef struct {
X char _portbytes[PORTSIZE];
X} port;
X
Xstruct _fakeport {
X long _p1;
X short _p2;
X};
X
Xtypedef struct { /* private part of capability */
X char prv_object[3];
X char prv_rights;
X port prv_random;
X} private;
X
Xtypedef struct {
X port cap_port;
X private cap_priv;
X} capability;
X
Xtypedef struct {
X port h_port;
X port h_signature;
X private h_priv;
X unshort h_command;
X long h_offset;
X unshort h_size;
X unshort h_extra;
X} header;
X
X#define h_status h_command /* alias: reply status */
X
X/*
X** Some function declarations that people tend to forget
X** because they are lazy.
X*/
Xextern unshort trans(), getreq(), putrep(), timeout();
+ END-OF-FILE amoeba.h
chmod 'u=rw,g=r,o=r' 'amoeba.h'
set `wc -c 'amoeba.h'`
count=$1
case $count in
2445) :;;
*) echo 'Bad character count in ''amoeba.h' >&2
echo 'Count should be 2445' >&2
esac
echo Extracting 'amparam.h'
sed 's/^X//' > 'amparam.h' << '+ END-OF-FILE ''amparam.h'
X/*
X** parameters for trans, getreq and putrep are given to the kernel
X** in a Trpar struct
X*/
X
Xtypedef struct
X{
X header * p_hdr; /* header pointer */
X bufptr p_buf; /* buffer pointer */
X unshort p_cnt; /* character count */
X} Param;
X
Xtypedef struct
X{
X Param tp_par[2];
X unshort tp_maxloc; /* trans locate timeout */
X} Trpar;
+ END-OF-FILE amparam.h
chmod 'u=rw,g=r,o=r' 'amparam.h'
set `wc -c 'amparam.h'`
count=$1
case $count in
327) :;;
*) echo 'Bad character count in ''amparam.h' >&2
echo 'Count should be 327' >&2
esac
echo Extracting 'host_os.h'
sed 's/^X//' > 'host_os.h' << '+ END-OF-FILE ''host_os.h'
X/****************************************************************************/
X/* */
X/* (c) Copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands */
X/* */
X/* This product is part of the Amoeba distributed operating system. */
X/* */
X/* Permission to use, sell, duplicate or disclose this software must be */
X/* obtained in writing. Requests for such permissions may be sent to */
X/* */
X/* */
X/* Dr. Andrew S. Tanenbaum */
X/* Dept. of Mathematics and Computer Science */
X/* Vrije Universiteit */
X/* Postbus 7161 */
X/* 1007 MC Amsterdam */
X/* The Netherlands */
X/* */
X/****************************************************************************/
X
X/*
X** This is the host_os.h file for Minix
X*/
X
X#define SIGAMOEBA SIGEMT
X
X#ifdef AM_KERNEL
X/*
X** to avoid altering trans.c, portcache.c, etc we need the following
X*/
X
X#ifndef PRIVATE
X#define PRIVATE static
X#endif
X
X/*
X** The following sequences of undefs and defines is to avoid clashes in the
X** naming of variables and constants in Amoeba and Minix.
X*/
X
X#undef ABORT
X#undef ABORTED
X#undef ACK
X#undef ACKED
X#undef ALIVE
X#undef BADADDRESS
X#undef BROADCAST
X#undef BUFSIZE
X#undef CRASH
X#undef DEAD
X#undef DELETE
X#undef DONE
X#undef DONTKNOW
X#undef ENQUIRY
X#undef FAIL
X#undef FAILED
X#undef GLOBAL
X#undef HASHMASK
X#undef HEADERSIZE
X#undef HERE
X#undef IDLE
X#undef IMMORTAL
X#undef LAST
X#undef LOCAL
X#undef LOCATE
X#undef LOCATING
X#undef LOOK
X#undef MEMFAULT
X#undef MORTAL
X#undef NAK
X#undef NESTED
X#undef NHASH
X#undef NILVECTOR
X#undef NOSEND
X#undef NOTFOUND
X#undef NOWAIT
X#undef NOWHERE
X#undef PACKETSIZE
X#undef PORT
X#undef RECEIVING
X#undef REPLY
X#undef REQUEST
X#undef RETRANS
X#undef RUNNABLE
X#undef SEND
X#undef SENDING
X#undef SERVING
X#undef SOMEWHERE
X#undef TASK
X#undef TYPE
X#undef WAIT
X
X#undef bit
X#undef concat
X#undef disable
X#undef enable
X#undef hash
X#undef hibyte
X#undef lobyte
X#undef siteaddr
X#undef sizeoftable
X
X#define allocbuf am_allocbuf
X#define append am_append
X#define area am_area
X#define badassertion am_badassertion
X#define cleanup am_cleanup
X#define debug am_debug
X#define destroy am_destroy
X#define freebuf am_freebuf
X#define getall am_gall
X#define getbuf am_gbuf
X#define getreq am_greq
X#define getsig am_gsig
X#define handle am_handle
X#define locate am_locate
X#define netenable am_netenable
X#define netsweep am_sweep
X#define ntask am_ntsk
X#define pickoff am_pickoff
X#define porttab am_ptab
X#define puthead am_puthead
X#define putbuf am_pbuf
X#define putrep am_prep
X#define putsig am_psig
X#define sendsig am_sendsig
X#define sleep am_sleep
X#define task am_task
X#define ticker am_ticker
X#define timeout am_timeout
X#define trans am_trans
X#define umap am_umap
X#define uniqport am_uniqport
X#define uppertask am_uppertask
X#define wakeup am_wakeup
X
X#endif AM_KERNEL
+ END-OF-FILE host_os.h
chmod 'u=rw,g=r,o=r' 'host_os.h'
set `wc -c 'host_os.h'`
count=$1
case $count in
2893) :;;
*) echo 'Bad character count in ''host_os.h' >&2
echo 'Count should be 2893' >&2
esac
exit 0