resonance 1.0.1
Loading...
Searching...
No Matches
AsyncRequest Struct Reference

One queued or completed asynchronous request. More...

#include <async.h>

Collaboration diagram for AsyncRequest:

Public Attributes

int mId
int mFile
void * mBuffer
void * mReadBuffer
int mReadLength
int mLength
int mStreamFile
unsigned mFlags
AsyncJobInfo * mJobs
AsyncCallback * mCallback
int mStatus
int mOwnsBuffer

Detailed Description

One queued or completed asynchronous request.

The record is 48 bytes and lives inline in the pending and completed lists. A list node is therefore the eight-byte node header followed by this.

Two windows are recorded rather than one. mBuffer and mLength describe what the caller receives and are what AsyncPollComplete() reports, while mReadBuffer and mReadLength describe where the drive data lands and how much of it there is. The two agree for an ordinary read, and they differ for a compressed one, where the stored bytes are read into the tail of the buffer and then inflated forward over the whole of it.

Every member is public because AsyncSubmitRequest() and AsyncLoadFileByPath() build the record field by field with no accessor anywhere in the image, and the record has no behaviour of its own.

Member Data Documentation

◆ mId

int AsyncRequest::mId

Identifier the poll and cancel paths match on. +0x00

◆ mFile

int AsyncRequest::mFile

The file, with kFileHandleArkStream for an ark stream. +0x04

◆ mBuffer

void* AsyncRequest::mBuffer

Destination the caller receives. +0x08

◆ mReadBuffer

void* AsyncRequest::mReadBuffer

Destination the drive data lands in. +0x0c

◆ mReadLength

int AsyncRequest::mReadLength

Bytes to transfer from the file. +0x10

◆ mLength

int AsyncRequest::mLength

Bytes the caller receives. +0x14

◆ mStreamFile

int AsyncRequest::mStreamFile

mFile resolved to the file the sector cache is keyed by. +0x18

◆ mFlags

unsigned AsyncRequest::mFlags

kAsyncRequestCloseFile and kAsyncRequestInflate. +0x1c

◆ mJobs

AsyncJobInfo* AsyncRequest::mJobs

Job chain, released whenever the request exits a list. +0x20

◆ mCallback

AsyncCallback* AsyncRequest::mCallback

Receiver the pump reports completion to, or null. +0x24

◆ mStatus

int AsyncRequest::mStatus

What AsyncPollComplete() reports. +0x28

◆ mOwnsBuffer

int AsyncRequest::mOwnsBuffer

Non-zero when cancel must release mBuffer. +0x2c


The documentation for this struct was generated from the following file: