poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] ios: Introduce IO stream device for stdin, stdout, stder


From: Jose E. Marchesi
Subject: Re: [PATCH 2/2] ios: Introduce IO stream device for stdin, stdout, stderr.
Date: Sun, 10 May 2020 20:42:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

    
    Upon opening these devices initialize a buffer to store the read or
    to-be-written data. It was discussed during the first poke-conf that
    such a buffer should not be kept as one piece, as this might easily
    make copying the whole buffer ver expensive during expanding and
    flushing (i.e. discarding the early parts of the buffer). Therefore,
    the buffer is implemented in chunks. These chunks are kept in hashtable
    -if you may- where the hashfunction is simply chunk_no % IOB_BUCKET_COUNT.
    
    It is true that this code requires better error handling, which partly
    reqires changes to the rest of the ios as well. Moreover, currently,
    ios_dev_stream_flush still requires language level support. Otherwise
    tested. Tested also with the following parameters:
    IOB_CHUNK_SIZE          1
    IOB_BUCKET_COUNT        2

I would for ios-dev-buffer.h to be renamed to ios-buffer.h, if you don't
mind.

Other than that, and what I already mentioned about the IOS subsystem to
automatically open the IOS 0, 1 and 2 and therefore not recognize
"stdin", "stdout" and "stderr" as handlers, this is OK for master.

As soon as this gets to master, I will add support for the
language-level "flush" so we can start playing with streams :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]