From 6994475d83b3893e22054017a605de9dd28944ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 28 Dec 2003 15:27:24 +0000 Subject: [PATCH] Added a comment about a stupidity I did with pipefs - I seem to have completely forgotten about different address spaces with direct (unbuffered) pipe transfer, shame on me. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5786 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/fs/pipefs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/kernel/core/fs/pipefs.cpp b/src/kernel/core/fs/pipefs.cpp index ae3d6409ca..2018e6387e 100644 --- a/src/kernel/core/fs/pipefs.cpp +++ b/src/kernel/core/fs/pipefs.cpp @@ -575,6 +575,8 @@ read_request::PutBuffer(const void **_buffer, size_t *_bufferSize) uint8 *source = (uint8 *)*_buffer; + // ToDo: how is that supposed to work if the addresses are in + // different address spaces? if (user_memcpy((uint8 *)buffer + bytes_read, source, bytes) < B_OK) return B_BAD_ADDRESS; @@ -932,6 +934,11 @@ pipefs_read(fs_volume _volume, fs_vnode _node, fs_cookie _cookie, off_t pos, read_request request; request.buffer = buffer; + // ToDo: what the hell? How is this supposed to work with applications + // that have a different address space? At least read_request::PutBuffer() + // is problematic - it should only do something if the buffer is either + // local, or large enough so that mirroring/copying the other address + // space is faster than the buffer chain. request.buffer_size = *_length; request.bytes_read = 0;