* Port:
- Send() now also gets the message to send as parameter. - Added methods to reserve and unreserve space in the buffer. * RequestAllocator: Uses the port buffer reservation methods now. This allows to let more than one RequestAllocator use a Port in a stack-like manner. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29565 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -33,10 +33,14 @@ public:
|
||||
|
||||
const Info* GetInfo() const;
|
||||
|
||||
void* GetBuffer() const;
|
||||
int32 GetCapacity() const;
|
||||
void* GetBuffer() const { return fBuffer; }
|
||||
int32 GetCapacity() const { return fCapacity; }
|
||||
|
||||
status_t Send(int32 size);
|
||||
void Reserve(int32 endOffset);
|
||||
void Unreserve(int32 endOffset);
|
||||
int32 ReservedSize() const { return fReservedSize; }
|
||||
|
||||
status_t Send(const void* message, int32 size);
|
||||
status_t Receive(void** _message, size_t* _size,
|
||||
bigtime_t timeout = -1);
|
||||
|
||||
@@ -46,6 +50,7 @@ private:
|
||||
Info fInfo;
|
||||
uint8* fBuffer;
|
||||
int32 fCapacity;
|
||||
int32 fReservedSize;
|
||||
status_t fInitStatus;
|
||||
bool fOwner;
|
||||
};
|
||||
|
||||
@@ -61,6 +61,8 @@ private:
|
||||
Port* fPort;
|
||||
Request* fRequest;
|
||||
int32 fRequestSize;
|
||||
int32 fPortReservedOffset;
|
||||
int32 fRequestOffset;
|
||||
area_id fAllocatedAreas[MAX_REQUEST_ADDRESS_COUNT];
|
||||
int32 fAllocatedAreaCount;
|
||||
DeferredInitInfo fDeferredInitInfos[MAX_REQUEST_ADDRESS_COUNT];
|
||||
|
||||
Reference in New Issue
Block a user