Mercurial > hg > Members > kono > os9 > sbc09
diff CoCoOS9/defs/pipedefs @ 31:bd2b07db8917 cocoos9lv2v3
CoCoOS9 version
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Jul 2018 15:16:13 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CoCoOS9/defs/pipedefs Sat Jul 14 15:16:13 2018 +0900 @@ -0,0 +1,76 @@ + nam PipeDefs + ttl OS-9 Pipe Definitions + +* OS-9 Pipe Definitions +* +* IOMan equates duplicated for PipeMan use +* + +NPATHS set 16 ;Maximum local paths per task -- must match IOMan +NameMax set 29 ;Maximum length of a file name + +* +* Device Driver Static Storage Layout +* + org V.User +V.List rmb 2 ;Pointer to 1st pipe's pipe buffer +PManMem equ . ;Device driver memory (drive table equivalent) + +* +* Pipe Buffer Data Structure +* + org 0 +PP.PD rmb 2 ;Pointer to shared path descriptor +PP.Next rmb 2 ;Pointer to next pipe buffer in system map +PP.Prev rmb 2 ;Pointer to previous pipe buffer in system map +PP.Rsrv rmb 2 ;Reserved +PP.Data equ . ;Data buffer begins at this offset + +* +* Unique Path Descriptor Variables +* + org PD.FST +*** PP.Read must have bit 4 clear; PP.Writ must be PP.Read XOR 4 +PD.Read equ . +PD.RPID rmb 1 ;Process ID of reader waiting on signal +PD.RCT rmb 1 ;Number of blocked readers +PD.RSIG rmb 1 ;Signal to send reader +PD.REOR rmb 1 ;Read EOR character +PD.Writ equ . +PD.WPID rmb 1 ;Process ID of writer waiting on signal +PD.WCT rmb 1 ;Number of blocked writers +PD.WSIG rmb 1 ;Signal to send writer +PD.WEOR rmb 1 ;Write EOR character (dummy) +*** End of special section +PD.End rmb 2 ;Pointer to end of pipe buffer +PD.NxtI rmb 2 ;Next in pointer +PD.NxtO rmb 2 ;Next out pointer +PD.RFlg rmb 1 ;"Ready" flag +PD.Wrtn rmb 1 ;"Written" flag +PD.BCnt rmb 2 ;# queue elements currently bufered +PD.Own rmb 1 ;Process ID of pipe original creator +PD.Keep rmb 1 ;Non-zero if pipe has been kept open artificailly +PD.QSiz rmb 2 ;Max. elements in queue (copied from OPT section) + +* +* Path descriptor option section +* +* Note that PD.Name overlaps with the last byte of PD.ECnt. +* PD.ECnt is copied to PD.QSiz as part of OPEN or CREATE, +* to make room for the pipe name. +* + org (PD.OPT+1) +PD.ESiz rmb 1 ;Size of each queue element +PD.ECnt rmb 2 ;Max. elements in queue (initial position) + +* +* Device Descriptor definitions +* +IT.PDC equ $12 ;Pipe device class (like IT.DTP, IT.DVC) + org IT.PDC + rmb 1 ;Leave room for device class +IT.ESiz rmb 1 ;Size of each queue element +IT.ECnt rmb 2 ;Max. elements in queue (initial position) + +* End of pipedefs +