* Removed the unused Port::SendAndReceive().
* Change Port::Receive() semantics. It does no longer use the buffer associated with the object. Instead it allocates heap memory for the caller. Since there's only one caller who clones the message anyway, we save one copy this way (though we have an additional syscall in userland) and don't overwrite a request being prepared for sending. * Changed RequestAllocator::ReadRequest() to also read the request from the port. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29563 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
// Port.h
|
||||
|
||||
/*
|
||||
* Copyright 2001-2009, Ingo Weinhold, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef USERLAND_FS_PORT_H
|
||||
#define USERLAND_FS_PORT_H
|
||||
|
||||
@@ -38,8 +40,8 @@ public:
|
||||
int32 GetMessageSize() const;
|
||||
|
||||
status_t Send(int32 size);
|
||||
status_t SendAndReceive(int32 size);
|
||||
status_t Receive(bigtime_t timeout = -1);
|
||||
status_t Receive(void** _message, size_t* _size,
|
||||
bigtime_t timeout = -1);
|
||||
|
||||
private:
|
||||
friend class ::KernelDebug;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// RequestAllocator.h
|
||||
|
||||
/*
|
||||
* Copyright 2001-2009, Ingo Weinhold, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef USERLAND_FS_REQUEST_ALLOCATOR_H
|
||||
#define USERLAND_FS_REQUEST_ALLOCATOR_H
|
||||
|
||||
@@ -28,7 +30,7 @@ public:
|
||||
void FinishDeferredInit();
|
||||
|
||||
status_t AllocateRequest(int32 size);
|
||||
status_t ReadRequest();
|
||||
status_t ReadRequest(bigtime_t timeout);
|
||||
|
||||
Request* GetRequest() const;
|
||||
int32 GetRequestSize() const;
|
||||
|
||||
Reference in New Issue
Block a user