0
|
1 nam PipeDefs
|
|
2 ttl OS-9 Pipe Definitions
|
|
3
|
|
4 * OS-9 Pipe Definitions
|
|
5 *
|
|
6 * IOMan equates duplicated for PipeMan use
|
|
7 *
|
|
8
|
|
9 NPATHS set 16 ;Maximum local paths per task -- must match IOMan
|
|
10 NameMax set 29 ;Maximum length of a file name
|
|
11
|
|
12 *
|
|
13 * Device Driver Static Storage Layout
|
|
14 *
|
|
15 org V.User
|
|
16 V.List rmb 2 ;Pointer to 1st pipe's pipe buffer
|
|
17 PManMem equ . ;Device driver memory (drive table equivalent)
|
|
18
|
|
19 *
|
|
20 * Pipe Buffer Data Structure
|
|
21 *
|
|
22 org 0
|
|
23 PP.PD rmb 2 ;Pointer to shared path descriptor
|
|
24 PP.Next rmb 2 ;Pointer to next pipe buffer in system map
|
|
25 PP.Prev rmb 2 ;Pointer to previous pipe buffer in system map
|
|
26 PP.Rsrv rmb 2 ;Reserved
|
|
27 PP.Data equ . ;Data buffer begins at this offset
|
|
28
|
|
29 *
|
|
30 * Unique Path Descriptor Variables
|
|
31 *
|
|
32 org PD.FST
|
|
33 *** PP.Read must have bit 4 clear; PP.Writ must be PP.Read XOR 4
|
|
34 PD.Read equ .
|
|
35 PD.RPID rmb 1 ;Process ID of reader waiting on signal
|
|
36 PD.RCT rmb 1 ;Number of blocked readers
|
|
37 PD.RSIG rmb 1 ;Signal to send reader
|
|
38 PD.REOR rmb 1 ;Read EOR character
|
|
39 PD.Writ equ .
|
|
40 PD.WPID rmb 1 ;Process ID of writer waiting on signal
|
|
41 PD.WCT rmb 1 ;Number of blocked writers
|
|
42 PD.WSIG rmb 1 ;Signal to send writer
|
|
43 PD.WEOR rmb 1 ;Write EOR character (dummy)
|
|
44 *** End of special section
|
|
45 PD.End rmb 2 ;Pointer to end of pipe buffer
|
|
46 PD.NxtI rmb 2 ;Next in pointer
|
|
47 PD.NxtO rmb 2 ;Next out pointer
|
|
48 PD.RFlg rmb 1 ;"Ready" flag
|
|
49 PD.Wrtn rmb 1 ;"Written" flag
|
|
50 PD.BCnt rmb 2 ;# queue elements currently bufered
|
|
51 PD.Own rmb 1 ;Process ID of pipe original creator
|
|
52 PD.Keep rmb 1 ;Non-zero if pipe has been kept open artificailly
|
|
53 PD.QSiz rmb 2 ;Max. elements in queue (copied from OPT section)
|
|
54
|
|
55 *
|
|
56 * Path descriptor option section
|
|
57 *
|
|
58 * Note that PD.Name overlaps with the last byte of PD.ECnt.
|
|
59 * PD.ECnt is copied to PD.QSiz as part of OPEN or CREATE,
|
|
60 * to make room for the pipe name.
|
|
61 *
|
|
62 org (PD.OPT+1)
|
|
63 PD.ESiz rmb 1 ;Size of each queue element
|
|
64 PD.ECnt rmb 2 ;Max. elements in queue (initial position)
|
|
65
|
|
66 *
|
|
67 * Device Descriptor definitions
|
|
68 *
|
|
69 IT.PDC equ $12 ;Pipe device class (like IT.DTP, IT.DVC)
|
|
70 org IT.PDC
|
|
71 rmb 1 ;Leave room for device class
|
|
72 IT.ESiz rmb 1 ;Size of each queue element
|
|
73 IT.ECnt rmb 2 ;Max. elements in queue (initial position)
|
|
74
|
|
75 * End of pipedefs
|
|
76
|