DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦08d82a04b⟧

    Length: 2368 (0x940)
    Notes: UNIX file
    Names: »seg.h«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »sys/h/seg.h« 

Hex Dump

0x000…020 2f 2a 20 28 2d 6c 67 6c 0a 20 2a 20 09 54 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 63 6f 6e   ┆/* (-lgl  *  The information con┆
0x020…040 74 61 69 6e 65 64 20 68 65 72 65 69 6e 20 69 73 20 61 20 74 72 61 64 65 20 73 65 63 72 65 74 20   ┆tained herein is a trade secret ┆
0x040…060 6f 66 20 4d 61 72 6b 20 57 69 6c 6c 69 61 6d 73 0a 20 2a 20 09 43 6f 6d 70 61 6e 79 2c 20 61 6e   ┆of Mark Williams  *  Company, an┆
0x060…080 64 20 20 69 73 20 63 6f 6e 66 69 64 65 6e 74 69 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 20   ┆d  is confidential information. ┆
0x080…0a0 20 49 74 20 69 73 20 70 72 6f 76 69 64 65 64 20 20 75 6e 64 65 72 20 61 0a 20 2a 20 09 6c 69 63   ┆ It is provided  under a  *  lic┆
0x0a0…0c0 65 6e 73 65 20 61 67 72 65 65 6d 65 6e 74 2c 20 20 61 6e 64 20 6d 61 79 20 62 65 20 20 63 6f 70   ┆ense agreement,  and may be  cop┆
0x0c0…0e0 69 65 64 20 6f 72 20 64 69 73 63 6c 6f 73 65 64 20 20 6f 6e 6c 79 20 75 6e 64 65 72 20 74 68 65   ┆ied or disclosed  only under the┆
0x0e0…100 0a 20 2a 20 09 74 65 72 6d 73 20 6f 66 20 20 74 68 61 74 20 61 67 72 65 65 6d 65 6e 74 2e 20 20   ┆  *  terms of  that agreement.  ┆
0x100…120 41 6e 79 20 20 72 65 70 72 6f 64 75 63 74 69 6f 6e 20 6f 72 20 64 69 73 63 6c 6f 73 75 72 65 20   ┆Any  reproduction or disclosure ┆
0x120…140 20 6f 66 20 74 68 69 73 0a 20 2a 20 09 6d 61 74 65 72 69 61 6c 20 77 69 74 68 6f 75 74 20 74 68   ┆ of this  *  material without th┆
0x140…160 65 20 65 78 70 72 65 73 73 20 77 72 69 74 74 65 6e 20 61 75 74 68 6f 72 69 7a 61 74 69 6f 6e 20   ┆e express written authorization ┆
0x160…180 6f 66 20 4d 61 72 6b 20 57 69 6c 6c 69 61 6d 73 0a 20 2a 20 09 43 6f 6d 70 61 6e 79 20 6f 72 20   ┆of Mark Williams  *  Company or ┆
0x180…1a0 70 65 72 73 75 61 6e 74 20 74 6f 20 74 68 65 20 6c 69 63 65 6e 73 65 20 61 67 72 65 65 6d 65 6e   ┆persuant to the license agreemen┆
0x1a0…1c0 74 20 69 73 20 75 6e 6c 61 77 66 75 6c 2e 0a 20 2a 20 0a 20 2a 20 09 43 4f 48 45 52 45 4e 54 20   ┆t is unlawful.  *   *  COHERENT ┆
0x1c0…1e0 56 65 72 73 69 6f 6e 20 30 2e 37 2e 33 0a 20 2a 20 09 43 6f 70 79 72 69 67 68 74 20 28 63 29 20   ┆Version 0.7.3  *  Copyright (c) ┆
0x1e0…200 31 39 38 32 2c 20 31 39 38 33 2c 20 31 39 38 34 2e 0a 20 2a 20 09 41 6e 20 75 6e 70 75 62 6c 69   ┆1982, 1983, 1984.  *  An unpubli┆
0x200…220 73 68 65 64 20 77 6f 72 6b 20 62 79 20 4d 61 72 6b 20 57 69 6c 6c 69 61 6d 73 20 43 6f 6d 70 61   ┆shed work by Mark Williams Compa┆
0x220…240 6e 79 2c 20 43 68 69 63 61 67 6f 2e 0a 20 2a 20 09 41 6c 6c 20 72 69 67 68 74 73 20 72 65 73 65   ┆ny, Chicago.  *  All rights rese┆
0x240…260 72 76 65 64 2e 0a 20 2d 6c 67 6c 29 20 2a 2f 0a 2f 2a 0a 20 2a 20 53 65 67 6d 65 6e 74 73 2e 0a   ┆rved.  -lgl) */ /*  * Segments. ┆
0x260…280 20 2a 2f 0a 23 69 66 6e 64 65 66 09 20 53 45 47 5f 48 0a 23 64 65 66 69 6e 65 09 20 53 45 47 5f   ┆ */ #ifndef  SEG_H #define  SEG_┆
0x280…2a0 48 0a 23 69 6e 63 6c 75 64 65 20 3c 74 79 70 65 73 2e 68 3e 0a 0a 2f 2a 0a 20 2a 20 53 65 67 6d   ┆H #include <types.h>  /*  * Segm┆
0x2a0…2c0 65 6e 74 20 73 74 72 75 63 74 75 72 65 2e 0a 20 2a 2f 0a 74 79 70 65 64 65 66 20 73 74 72 75 63   ┆ent structure.  */ typedef struc┆
0x2c0…2e0 74 20 73 65 67 20 7b 0a 09 73 74 72 75 63 74 09 20 73 65 67 20 2a 73 5f 66 6f 72 77 3b 09 09 2f   ┆t seg {  struct  seg *s_forw;  /┆
0x2e0…300 2a 20 46 6f 72 77 61 72 64 20 70 6f 69 6e 74 65 72 20 2a 2f 0a 09 73 74 72 75 63 74 09 20 73 65   ┆* Forward pointer */  struct  se┆
0x300…320 67 20 2a 73 5f 62 61 63 6b 3b 09 09 2f 2a 20 42 61 63 6b 77 61 72 64 20 70 6f 69 6e 74 65 72 20   ┆g *s_back;  /* Backward pointer ┆
0x320…340 2a 2f 0a 09 73 74 72 75 63 74 09 20 69 6e 6f 64 65 20 2a 73 5f 69 70 3b 09 09 2f 2a 20 49 6e 6f   ┆*/  struct  inode *s_ip;  /* Ino┆
0x340…360 64 65 20 70 6f 69 6e 74 65 72 20 66 6f 72 20 73 68 61 72 65 64 20 74 65 78 74 20 2a 2f 0a 09 73   ┆de pointer for shared text */  s┆
0x360…380 68 6f 72 74 09 20 73 5f 66 6c 61 67 73 3b 09 09 2f 2a 20 46 6c 61 67 73 20 2a 2f 0a 09 63 68 61   ┆hort  s_flags;  /* Flags */  cha┆
0x380…3a0 72 09 20 73 5f 75 72 65 66 63 3b 09 09 2f 2a 20 52 65 66 65 72 65 6e 63 65 20 63 6f 75 6e 74 20   ┆r  s_urefc;  /* Reference count ┆
0x3a0…3c0 6f 66 20 73 65 67 6d 65 6e 74 20 2a 2f 0a 09 63 68 61 72 09 20 73 5f 6c 72 65 66 63 3b 09 09 2f   ┆of segment */  char  s_lrefc;  /┆
0x3c0…3e0 2a 20 4c 6f 63 6b 20 72 65 66 65 72 65 6e 63 65 20 63 6f 75 6e 74 20 2a 2f 0a 09 73 61 64 64 72   ┆* Lock reference count */  saddr┆
0x3e0…400 5f 74 09 20 73 5f 73 69 7a 65 3b 09 09 2f 2a 20 53 69 7a 65 20 2a 2f 0a 09 73 61 64 64 72 5f 74   ┆_t  s_size;  /* Size */  saddr_t┆
0x400…420 09 20 73 5f 6d 62 61 73 65 3b 09 09 2f 2a 20 4d 65 6d 6f 72 79 20 62 61 73 65 20 61 64 64 72 65   ┆  s_mbase;  /* Memory base addre┆
0x420…440 73 73 20 2a 2f 0a 09 64 61 64 64 72 5f 74 09 20 73 5f 64 62 61 73 65 3b 09 09 2f 2a 20 44 69 73   ┆ss */  daddr_t  s_dbase;  /* Dis┆
0x440…460 6b 20 62 61 73 65 20 61 64 64 72 65 73 73 20 2a 2f 0a 7d 20 53 45 47 3b 0a 0a 2f 2a 0a 20 2a 20   ┆k base address */ } SEG;  /*  * ┆
0x460…480 46 6c 61 67 73 20 28 73 5f 66 6c 61 67 73 29 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 53 46 43   ┆Flags (s_flags).  */ #define SFC┆
0x480…4a0 4f 52 45 09 30 30 30 30 30 30 31 09 09 09 2f 2a 20 4d 65 6d 6f 72 79 20 72 65 73 69 64 65 6e 74   ┆ORE 0000001   /* Memory resident┆
0x4a0…4c0 20 2a 2f 0a 23 64 65 66 69 6e 65 09 53 46 44 4f 57 4e 09 30 30 30 30 30 30 32 09 09 09 2f 2a 20   ┆ */ #define SFDOWN 0000002   /* ┆
0x4c0…4e0 53 65 67 6d 65 6e 74 20 67 72 6f 77 73 20 64 6f 77 6e 77 61 72 64 20 2a 2f 0a 23 64 65 66 69 6e   ┆Segment grows downward */ #defin┆
0x4e0…500 65 20 53 46 53 48 52 58 09 30 30 30 30 30 30 34 09 09 09 2f 2a 20 53 68 61 72 65 64 20 73 65 67   ┆e SFSHRX 0000004   /* Shared seg┆
0x500…520 6d 65 6e 74 20 2a 2f 0a 23 64 65 66 69 6e 65 20 53 46 54 45 58 54 09 30 30 30 30 30 31 30 09 09   ┆ment */ #define SFTEXT 0000010  ┆
0x520…540 09 2f 2a 20 54 65 78 74 20 73 65 67 6d 65 6e 74 20 2a 2f 0a 23 64 65 66 69 6e 65 20 53 46 48 49   ┆ /* Text segment */ #define SFHI┆
0x540…560 47 48 09 30 30 30 30 30 32 30 09 09 09 2f 2a 20 41 6c 6c 6f 63 61 74 65 20 73 65 67 6d 65 6e 74   ┆GH 0000020   /* Allocate segment┆
0x560…580 20 66 72 6f 6d 20 68 69 67 68 20 65 6e 64 20 2a 2f 0a 23 64 65 66 69 6e 65 09 53 46 53 59 53 54   ┆ from high end */ #define SFSYST┆
0x580…5a0 09 30 30 30 30 30 34 30 09 09 09 2f 2a 20 53 79 73 74 65 6d 20 73 65 67 6d 65 6e 74 20 2a 2f 0a   ┆ 0000040   /* System segment */ ┆
0x5a0…5c0 0a 2f 2a 0a 20 2a 20 50 73 65 75 64 6f 20 66 6c 61 67 73 2e 20 20 28 70 61 73 73 65 64 20 74 6f   ┆ /*  * Pseudo flags.  (passed to┆
0x5c0…5e0 20 73 61 6c 6c 6f 63 29 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 09 53 46 4e 53 57 50 09 30 30 34   ┆ salloc).  */ #define SFNSWP 004┆
0x5e0…600 30 30 30 30 09 09 09 2f 2a 20 44 6f 6e 27 74 20 73 77 61 70 20 2a 2f 0a 23 64 65 66 69 6e 65 20   ┆0000   /* Don't swap */ #define ┆
0x600…620 53 46 4e 43 4c 52 09 30 31 30 30 30 30 30 09 09 09 2f 2a 20 44 6f 6e 27 74 20 63 6c 65 61 72 20   ┆SFNCLR 0100000   /* Don't clear ┆
0x620…640 73 65 67 6d 65 6e 74 20 2a 2f 0a 0a 23 69 66 64 65 66 20 70 3a 01 cc 25 4c 0a 2f 2a 0a 20 2a 20   ┆segment */  #ifdef p:  %L /*  * ┆
0x640…660 46 75 6e 63 74 69 6f 6e 73 2e 0a 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 2a 69 6f 6d 61 70   ┆Functions.  */ extern SEG *iomap┆
0x660…680 76 70 28 29 3b 09 09 2f 2a 20 62 69 6f 2e 63 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 2a 73   ┆vp();  /* bio.c */ extern SEG *s┆
0x680…6a0 65 67 64 75 70 6c 28 29 3b 09 09 2f 2a 20 73 65 67 2e 63 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45   ┆egdupl();  /* seg.c */ extern SE┆
0x6a0…6c0 47 09 2a 73 73 61 6c 6c 6f 63 28 29 3b 09 09 2f 2a 20 73 65 67 2e 63 20 2a 2f 0a 65 78 74 65 72   ┆G *ssalloc();  /* seg.c */ exter┆
0x6c0…6e0 6e 09 53 45 47 09 2a 73 61 6c 6c 6f 63 28 29 3b 09 09 2f 2a 20 73 65 67 2e 63 20 2a 2f 0a 65 78   ┆n SEG *salloc();  /* seg.c */ ex┆
0x6e0…700 74 65 72 6e 09 53 45 47 09 2a 73 65 67 73 65 78 74 28 29 3b 09 09 2f 2a 20 73 65 67 2e 63 20 2a   ┆tern SEG *segsext();  /* seg.c *┆
0x700…720 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 2a 73 65 67 64 75 70 64 28 29 3b 09 09 2f 2a 20 73 65 67   ┆/ extern SEG *segdupd();  /* seg┆
0x720…740 2e 63 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 2a 73 64 61 6c 6c 6f 63 28 29 3b 09 09 2f 2a   ┆.c */ extern SEG *sdalloc();  /*┆
0x740…760 20 73 65 67 2e 63 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 2a 73 6d 61 6c 6c 6f 63 28 29 3b   ┆ seg.c */ extern SEG *smalloc();┆
0x760…780 09 09 2f 2a 20 73 65 67 2e 63 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 2a 73 68 61 6c 6c 6f   ┆  /* seg.c */ extern SEG *shallo┆
0x780…7a0 63 28 29 3b 09 09 2f 2a 20 73 65 67 2e 63 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 2a 65 78   ┆c();  /* seg.c */ extern SEG *ex┆
0x7a0…7c0 61 72 65 61 64 28 29 3b 09 09 2f 2a 20 65 78 65 63 2e 63 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45   ┆aread();  /* exec.c */ extern SE┆
0x7c0…7e0 47 09 2a 65 78 73 72 65 61 64 28 29 3b 09 09 2f 2a 20 65 78 65 63 2e 63 20 2a 2f 0a 65 78 74 65   ┆G *exsread();  /* exec.c */ exte┆
0x7e0…800 72 6e 09 53 45 47 09 2a 65 78 73 74 61 63 6b 28 29 3b 09 09 2f 2a 20 65 78 65 63 2e 63 20 2a 2f   ┆rn SEG *exstack();  /* exec.c */┆
0x800…820 0a 0a 23 65 6e 64 69 66 0a 0a 23 69 66 64 65 66 20 4b 45 52 4e 45 4c 0a 2f 2a 0a 20 2a 20 47 6c   ┆  #endif  #ifdef KERNEL /*  * Gl┆
0x820…840 6f 62 61 6c 20 76 61 72 69 61 62 6c 65 73 2e 0a 20 2a 2f 0a 65 78 74 65 72 6e 09 69 6e 74 09 73   ┆obal variables.  */ extern int s┆
0x840…860 65 78 66 6c 61 67 3b 09 09 2f 2a 20 53 77 61 70 70 65 72 20 65 78 69 73 74 61 6e 74 20 2a 2f 0a   ┆exflag;  /* Swapper existant */ ┆
0x860…880 65 78 74 65 72 6e 09 47 41 54 45 09 73 65 67 6c 69 6e 6b 3b 09 09 2f 2a 20 47 61 74 65 20 66 6f   ┆extern GATE seglink;  /* Gate fo┆
0x880…8a0 72 20 73 5f 66 6f 72 77 20 61 6e 64 20 73 5f 62 61 63 6b 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45   ┆r s_forw and s_back */ extern SE┆
0x8a0…8c0 47 09 73 65 67 73 77 61 70 3b 09 09 2f 2a 20 53 65 67 6d 65 6e 74 73 20 72 65 73 65 72 76 65 64   ┆G segswap;  /* Segments reserved┆
0x8c0…8e0 20 66 6f 72 20 74 68 65 20 73 77 61 70 70 65 72 20 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 73   ┆ for the swapper */ extern SEG s┆
0x8e0…900 65 67 6d 71 3b 09 09 09 2f 2a 20 4d 65 6d 6f 72 79 20 73 65 67 6d 65 6e 74 20 71 75 65 75 65 20   ┆egmq;   /* Memory segment queue ┆
0x900…920 2a 2f 0a 65 78 74 65 72 6e 09 53 45 47 09 73 65 67 64 71 3b 09 09 09 2f 2a 20 53 65 67 6d 65 6e   ┆*/ extern SEG segdq;   /* Segmen┆
0x920…940 74 20 64 69 73 6b 20 71 75 65 75 65 20 2a 2f 0a 0a 23 65 6e 64 69 66 0a 0a 23 65 6e 64 69 66 0a   ┆t disk queue */  #endif  #endif ┆