fixup commit for tag 'distr3'
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
case $# in
|
||||
0) ar ru /user0/bot/lib/lib2.a *.o
|
||||
ranlib /user0/bot/lib/lib2.a
|
||||
rm -f *.o
|
||||
;;
|
||||
*) keys=$1
|
||||
shift
|
||||
ar $keys /user0/bot/lib/lib2.a $*
|
||||
;;
|
||||
esac
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
case $# in
|
||||
0) ar ru /user0/bot/lib/lib4.a *.o
|
||||
ranlib /user0/bot/lib/lib4.a
|
||||
rm -f *.o
|
||||
;;
|
||||
*) keys=$1
|
||||
shift
|
||||
ar $keys /user0/bot/lib/lib4.a $*
|
||||
;;
|
||||
esac
|
||||
@@ -1,28 +0,0 @@
|
||||
PRIMITIVES= par_vax.s
|
||||
PARALLEL= parco.c par.c co.c
|
||||
OCRT= ocrt.c builtin.c channel.c chan_struct.c
|
||||
|
||||
COMMON= $(PRIMITIVES) $(PARALLEL) $(OCRT)
|
||||
|
||||
SIZE2= em2.e
|
||||
SIZE4= em4.e
|
||||
|
||||
LIB2= /user0/bot/lib/lib2.a
|
||||
LIB4= /user0/bot/lib/lib4.a
|
||||
|
||||
ACK2= vax2
|
||||
ACK4= vax4
|
||||
|
||||
all: lib2 lib4
|
||||
|
||||
lib2: $(COMMON) $(SIZE2)
|
||||
rm -f *.o $(LIB2)
|
||||
$(ACK2) -c.o -L -Dvoid=char -Dptrdiff=long $(COMMON) $(SIZE2)
|
||||
ar cq $(LIB2) *.o
|
||||
rm -f *.o
|
||||
|
||||
lib4: $(COMMON) $(SIZE4)
|
||||
rm -f *.o $(LIB4)
|
||||
$(ACK4) -c.o -L -Dvoid=char $(COMMON) $(SIZE4)
|
||||
ar cq $(LIB4) *.o
|
||||
rm -f *.o
|
||||
@@ -1,52 +0,0 @@
|
||||
mes 2,2,4
|
||||
|
||||
oldtrp
|
||||
bss 4, 0, 0
|
||||
|
||||
exp $init
|
||||
pro $init, 0
|
||||
loc -321-1
|
||||
sim
|
||||
lpi $catch1
|
||||
sig
|
||||
sde oldtrp
|
||||
cal $initfile
|
||||
ret 0
|
||||
end 0
|
||||
|
||||
pro $catch1, 0
|
||||
lde oldtrp
|
||||
sig
|
||||
asp 4
|
||||
loe 0
|
||||
lde 4
|
||||
lol 0
|
||||
cal $catch
|
||||
asp 8
|
||||
lol 0
|
||||
trp
|
||||
rtt
|
||||
end 0
|
||||
|
||||
exp $now
|
||||
pro $now, 12
|
||||
zre deadlock
|
||||
lal -12
|
||||
loc 35
|
||||
mon
|
||||
asp 2
|
||||
ldl -12
|
||||
ret 4
|
||||
end 12
|
||||
|
||||
exp $block_mo
|
||||
pro $block_mo, 0
|
||||
ldl 4
|
||||
ldl 8
|
||||
ldl 0
|
||||
loc 4
|
||||
loc 2
|
||||
cuu
|
||||
bls 2
|
||||
ret 0
|
||||
end 0
|
||||
@@ -1,49 +0,0 @@
|
||||
mes 2,4,4
|
||||
|
||||
oldtrp
|
||||
bss 4, 0, 0
|
||||
|
||||
exp $init
|
||||
pro $init, 0
|
||||
loc -321-1
|
||||
sim
|
||||
lpi $catch1
|
||||
sig
|
||||
ste oldtrp
|
||||
cal $initfile
|
||||
ret 0
|
||||
end 0
|
||||
|
||||
pro $catch1, 0
|
||||
loe oldtrp
|
||||
sig
|
||||
asp 4
|
||||
loe 0
|
||||
loe 4
|
||||
lol 0
|
||||
cal $catch
|
||||
asp 12
|
||||
lol 0
|
||||
trp
|
||||
rtt
|
||||
end 0
|
||||
|
||||
exp $now
|
||||
pro $now, 12
|
||||
zre deadlock
|
||||
lal -12
|
||||
loc 35
|
||||
mon
|
||||
asp 4
|
||||
lol -12
|
||||
ret 4
|
||||
end 12
|
||||
|
||||
exp $block_mo
|
||||
pro $block_mo, 0
|
||||
lol 4
|
||||
lol 8
|
||||
lol 0
|
||||
bls 4
|
||||
ret 0
|
||||
end 0
|
||||
@@ -1,48 +0,0 @@
|
||||
/* $Header$ */
|
||||
/* channel.h - channel definitions */
|
||||
#include <stdio.h>
|
||||
#include "parco.h"
|
||||
|
||||
typedef union channel {
|
||||
struct { /* Interprocess channel */
|
||||
char _type; /* Channel type, see note */
|
||||
char synch; /* State in channel synchronization */
|
||||
long val; /* Transmitted value */
|
||||
} c;
|
||||
struct { /* File channel */
|
||||
char _type; /* Dummy field, see note */
|
||||
char index; /* Index in the file array */
|
||||
char flgs; /* Status flags: in use & readahead */
|
||||
char preread; /* Possible preread character */
|
||||
} f;
|
||||
} chan;
|
||||
#define type c._type /* Channel type */
|
||||
/* Note: The channel type should not be part of each structure in chan. But
|
||||
* the C alignment rules would make chan about 50% bigger if we had done it
|
||||
* the right way. Note that the order of fields in a struct cannot be a problem
|
||||
* as long as struct c is the largest within the union.
|
||||
*/
|
||||
|
||||
#define C_T_CHAN 0 /* Type of a interprocess channel */
|
||||
#define C_T_FILE 1 /* Type of a file channel */
|
||||
|
||||
#define C_S_FREE 0 /* IP channel is free */
|
||||
#define C_S_ANY 1 /* IP channel contains data */
|
||||
#define C_S_ACK 2 /* IP channel data is removed */
|
||||
|
||||
#define C_F_EOF (-1L) /* File channel returns EOF */
|
||||
#define C_F_TEXT (-2L) /* File channel becomes line oriented */
|
||||
#define C_F_RAW (-3L) /* File channel becomes character oriented */
|
||||
|
||||
#define C_F_INUSE 0x01 /* File channel is connected to a UNIX file */
|
||||
#define C_F_READAHEAD 0x02 /* File channel has a preread character */
|
||||
|
||||
extern chan file[_NFILE]; /* Array of file channels */
|
||||
extern FILE *unix_file[_NFILE]; /* Pointers to buffered UNIX files */
|
||||
|
||||
void c_init();
|
||||
|
||||
void chan_in(), cbyte_in(), c_wa_in(), c_ba_in();
|
||||
void chan_out(), c_wa_out(), c_ba_out();
|
||||
|
||||
int chan_any();
|
||||
@@ -1,19 +0,0 @@
|
||||
/* $Header$ */
|
||||
/* parco.h - Define names for simulation routines
|
||||
*
|
||||
* This file is to be included by users of the higher-level routines
|
||||
*
|
||||
*/
|
||||
|
||||
void pc_begin(), resumenext(), parend(), resume(), coend();
|
||||
int pc_fork();
|
||||
|
||||
#define nullid ((int *) 0 - (int *) 0)
|
||||
/* I.e. a 0 of type "pointer difference" */
|
||||
|
||||
#define parbegin(sbrk) pc_begin(sbrk, nullid)
|
||||
#define parfork() pc_fork(nullid)
|
||||
#define cobegin(sbrk, id) pc_begin(sbrk, id)
|
||||
#define cofork(id) pc_fork(id)
|
||||
|
||||
extern int deadlock;
|
||||
@@ -1,53 +0,0 @@
|
||||
/* $Header$ */
|
||||
/* process.h - Define administration types and functions
|
||||
*
|
||||
* This file is to be included by implementors of the higher
|
||||
* level routines
|
||||
*
|
||||
*/
|
||||
#include "parco.h"
|
||||
|
||||
#ifndef ptrdiff /* This type must be able to hold a pointer difference */
|
||||
#define ptrdiff int /* Define as long int if necessary */
|
||||
#endif
|
||||
|
||||
#define nil 0
|
||||
void *alloc(), free();
|
||||
|
||||
typedef ptrdiff wordsize, identification;
|
||||
|
||||
wordsize top_size();
|
||||
int top_save();
|
||||
void top_load(); /* Primitives */
|
||||
|
||||
struct procgroup;
|
||||
|
||||
struct process {
|
||||
struct process *next; /* Next process in the same group */
|
||||
struct procgroup *down; /* Process group running under this process */
|
||||
void *stack; /* Pointer to the saved stack top */
|
||||
identification id; /* Coroutine identification */
|
||||
};
|
||||
|
||||
#define init_between __i_b__ /* These names are hidden */
|
||||
#define save_between __s_b__
|
||||
#define load_betweens __l_b__
|
||||
#define delete_between __d_b__
|
||||
|
||||
void init_between(), save_between(), load_betweens(), delete_between();
|
||||
|
||||
struct procgroup {
|
||||
struct process **active;/* Active process within this group */
|
||||
struct procgroup *up; /* The group that this group belongs to */
|
||||
struct process *first; /* List of processes belonging to this group */
|
||||
void *s_brk; /* Point where the stack is split */
|
||||
void *between; /* Stack space between s_brk and up->s_brk */
|
||||
};
|
||||
|
||||
#define group __grp__ /* Ignore this please */
|
||||
#define highest_group __hgrp__
|
||||
|
||||
extern struct procgroup *group; /* Current running group */
|
||||
extern struct procgroup *highest_group; /* highest group that has been seen
|
||||
* while searching for a process
|
||||
*/
|
||||
@@ -1,53 +0,0 @@
|
||||
mes 2,2,4
|
||||
exp $top_size
|
||||
pro $top_size, 14
|
||||
ldl 0 ; s_brk
|
||||
lor 1 ; s_brk SP
|
||||
sbs 4 ; s_brk-SP
|
||||
ret 4 ; return size of block to be saved
|
||||
end 14
|
||||
|
||||
exp $top_save
|
||||
pro $top_save, 0
|
||||
loe 0
|
||||
lde 4 ; load line number and file name
|
||||
lim ; ignore mask
|
||||
lor 0 ; LB
|
||||
ldl 0 ; size of block
|
||||
loc 4
|
||||
loc 2
|
||||
cuu
|
||||
dup 2
|
||||
stl 0 ; push & store size in 2 bytes
|
||||
lor 1 ; SP (the SP BEFORE pushing)
|
||||
lor 1 ; SP (address of stack top to save)
|
||||
ldl 4 ; area
|
||||
lol 0 ; size
|
||||
bls 2 ; move whole block
|
||||
asp 18 ; remove the lot from the stack
|
||||
loc 1
|
||||
ret 2 ; return 1
|
||||
end 0
|
||||
|
||||
exp $top_load
|
||||
pro $top_load, 0
|
||||
ldl 0
|
||||
dup 4
|
||||
sde area ; copy area pointer from argument 0
|
||||
loi 4 ; load indirect to
|
||||
str 1 ; restore SP
|
||||
lde area ; load area, note that the SP is now correct
|
||||
lor 1 ; SP (the SP AFTER, see above)
|
||||
lde area
|
||||
lof 4 ; size of block
|
||||
bls 2 ; move block back (SP becomes the SP BEFORE again!)
|
||||
asp 2 ; drop size
|
||||
str 0 ; LB
|
||||
sim ; ignore mask
|
||||
sde 4
|
||||
ste 0 ; line and file
|
||||
loc 0
|
||||
ret 2 ; return 0
|
||||
end 0
|
||||
area
|
||||
bss 4,0,0
|
||||
@@ -1,46 +0,0 @@
|
||||
mes 2,4,4
|
||||
exp $top_size
|
||||
pro $top_size, 20
|
||||
lol 0 ; s_brk
|
||||
lor 1 ; s_brk SP
|
||||
sbs 4 ; s_brk-SP
|
||||
ret 4 ; return size of block to be saved
|
||||
end 20
|
||||
|
||||
exp $top_save
|
||||
pro $top_save, 0
|
||||
lde 0 ; load line number and file name
|
||||
lim ; ignore mask
|
||||
lor 0 ; LB
|
||||
lol 0 ; size of block
|
||||
lor 1 ; SP (the SP BEFORE pushing)
|
||||
lor 1 ; SP (address of stack top to save)
|
||||
lol 4 ; area
|
||||
lol 0 ; size
|
||||
bls 4 ; move whole block
|
||||
asp 24 ; remove the lot from the stack
|
||||
loc 1
|
||||
ret 4 ; return 1
|
||||
end 0
|
||||
|
||||
exp $top_load
|
||||
pro $top_load, 0
|
||||
lol 0
|
||||
dup 4
|
||||
ste area ; copy area pointer from argument 0
|
||||
loi 4 ; load indirect to
|
||||
str 1 ; restore sp
|
||||
loe area ; load area, note that the SP is now correct
|
||||
lor 1 ; SP (the SP AFTER, see above)
|
||||
loe area
|
||||
lof 4 ; size of block
|
||||
bls 4 ; move block back (SP becomes the SP BEFORE again!)
|
||||
asp 4 ; drop size
|
||||
str 0 ; LB
|
||||
sim ; ignore mask
|
||||
sde 0 ; line and file
|
||||
loc 0
|
||||
ret 4 ; return 0
|
||||
end 0
|
||||
area
|
||||
bss 4,0,0
|
||||
@@ -1,51 +0,0 @@
|
||||
# VAX code for the top_* primitives
|
||||
|
||||
.set BIG, 0x8000 # 32K chunk per movc3
|
||||
.text
|
||||
.align 1
|
||||
.globl _top_size
|
||||
.globl _top_save
|
||||
.globl _top_load
|
||||
|
||||
_top_size: .word 0x0000
|
||||
subl3 sp, 4(ap), r0 # bytes between stack pointer and break
|
||||
addl2 $(8+6+1)*4, r0 # add 8 regs, 6 pushed longwords (line, file,
|
||||
ret # ap, fp, size, sp) and 1 extra argument
|
||||
|
||||
_top_save: .word 0x0ff0 # save regs r4-r11
|
||||
movq hol0, -(sp) # push line number and file name
|
||||
movq ap, -(sp) # push LB equivalents ap and fp
|
||||
pushl 4(ap) # push size
|
||||
pushal -4(sp) # push sp (the sp AFTER pushing)
|
||||
movl $BIG, r6 # chunk size in r6
|
||||
movl 4(ap), r7 # size of block to move
|
||||
movl sp, r1 # source address
|
||||
movl 8(ap), r3 # destination address
|
||||
cmpl r7, r6
|
||||
jlequ 0f
|
||||
1: movc3 r6, (r1), (r3) # move chunk of the block, add r6 to r1 and r3
|
||||
subl2 r6, r7
|
||||
cmpl r7, r6
|
||||
jgtru 1b
|
||||
0: movc3 r7, (r1), (r3) # move what's left
|
||||
movl $1, r0 # return 1
|
||||
ret
|
||||
|
||||
_top_load: .word 0x0000
|
||||
movl 4(ap), r1 # source
|
||||
movl (r1), sp # restore sp
|
||||
movl $BIG, r6 # chunk size
|
||||
movl 4(r1), r7 # size
|
||||
movl sp, r3 # destination
|
||||
cmpl r7, r6
|
||||
jlequ 0f
|
||||
1: movc3 r6, (r1), (r3) # move chunk of the block back
|
||||
subl2 r6, r7
|
||||
cmpl r7, r6
|
||||
jgtru 1b
|
||||
0: movc3 r7, (r1), (r3) # move what's left back
|
||||
addl2 $8, sp # pop saved sp and size
|
||||
movq (sp)+, ap # pop LB's
|
||||
movq (sp)+, hol0 # pop line and file
|
||||
clrl r0 # return 0
|
||||
ret
|
||||
Reference in New Issue
Block a user