pipe.h

pipe.h

# 内容

  • 2020/01/14現在
1
2
3
4
5
6
7
8
9
typedef struct pipe<Impl, Isa> Impl file {
    #define PIPESIZE 512
    struct spinlock lock;
    char data[PIPESIZE];
    uint nread;     // number of bytes read
    uint nwrite;    // number of bytes written
    int readopen;   // read fd is still open
    int writeopen;  // write fd is still open
} pipe;

# UML

@startuml interface File { ..Data.. +union Data* file +union Data* impl +int ref +char readable +char writable +unsigned int off +struct stat* st +char* addr +int n ..CodeGear.. __code stat() __code read() __code write() __code close() }

File <|– Pipe

class Pipe { +struct spinlock lock +char data[PIPESIZE]; +uint nread; +uint nwrite; +int readopen; +int writeopen; }

@enduml

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy