-
Notifications
You must be signed in to change notification settings - Fork 2
PipeOp
Create a pipe for synchronised inter-task communication.
Max data Max write size (largest block of data that may be written to the pipe) Allocated mem (Task-local or shared memory to hold the data) Block size 0, 1, 512, max write size?
Block task until N bytes may be written
I've filled this many bytes (wakes any thread blocked in WaitForData)
Another task is going to take over filling this pipe
Useful, in case data can be dropped or consolidated (e.g. mouse movements)
I'm done filling the pipe
Block task until N bytes may be read
I don't need the first N bytes written any more (wakes a thread blocked in WaitForSpace)
Another task is going to take over listening at this pipe.
I don't want any more data, thanks
This will delete any pipe that has had NoMoreData called on it by the writer.
Errors: If there's outstanding data?
Byte-wise, receiver will wait for, say, 8 bytes after a 23 character.
File that will be opened, read or written, then closed.
Allocate capacity plus one block (sector size, page size), so that writer can always write capacilty bytes and reader can always write whole blocks to storage.
Allows for fseek-like actions. There is one file pointer (per file handle).
Needs a WaitUntilEmpty function, which notifies the reader/storage writer that the data in the pipe should be written before the pointer is modified. The fileing system may need to perform a read-modify-write on the first and last blocks.
It should be clear to the reader that it's not the same as no more data (which could delete the pipe, but only if the listener says NotListening, so may not be needed if associated with a file handle)
Create a pipe for the filing system to write to local memory, FS will be given a virtual view on it and fill it up. The reader can simply wait for the whole size to be filled.
Same as above, into a new TaskSlot, then jumping to 0x8000 when it's loaded.