RShPool Class Reference

class RShPool : public RHandleBase

A handle to a pool of buffers.

Pools can be created by either user-side or kernel-side components.

Upon receiving a pool handle the recipient must map either whole or part of the pool memory into its address space.

When finished with the pool, the recipient must Close() it: this invalidates the handle. Any further attempt to use it will panic the thread.

All pools are reference-counted and will only disappear after all users have closed them.

These handles are process-relative.

Inherits from

Constructor & Destructor Documentation

RShPool()

IMPORT_CRShPool()

Member Functions Documentation

CancelFreeSpaceNotification(TRequestStatus &)

IMPORT_C voidCancelFreeSpaceNotification(TRequestStatus &aStatus)

Cancels a free space notification request.

The status request completes with KErrCancel.

Parameters

TRequestStatus & aStatusThe status request whose notification is to be cancelled.

CancelLowSpaceNotification(TRequestStatus &)

IMPORT_C voidCancelLowSpaceNotification(TRequestStatus &aStatus)

Cancels a low space notification request.

The status request completes with KErrCancel.

Parameters

TRequestStatus & aStatusThe status request whose notification is to be cancelled.

Create(const TShPoolCreateInfo &, TUint)

IMPORT_C TIntCreate(const TShPoolCreateInfo &aBufInfo,
TUintaFlags
)

Creates a pool of buffers with the required attributes and maps the memory to this process. The RShPool object is changed by this call (iHandle is set).

TShPoolCreateInfo TShPoolClientFlags

Parameters

const TShPoolCreateInfo & aBufInfoA structure describing the parameters of the pool to be created. See TShPoolCreateInfo.
TUint aFlagsFlags to modify the behaviour of the handle. This should be a bit-wise OR of values from TShPoolHandleFlags.

FreeCount()

IMPORT_C TUintFreeCount()const

GetInfo(TShPoolInfo &)

IMPORT_C voidGetInfo(TShPoolInfo &aInfo)const

Retrieves information about the pool.

Parameters

TShPoolInfo & aInforeturns pool info.

RequestFreeSpaceNotification(TUint, TRequestStatus &)

IMPORT_C voidRequestFreeSpaceNotification(TUintaFreeBuffers,
TRequestStatus &aStatus
)

Requests a notification when the number of free buffers in the pool rises to the level specified.

Parameters

TUint aFreeBuffersSpecifies the number of free buffers that will trigger completion of the notification.
TRequestStatus & aStatusStatus request to be completed when the condition is met.

RequestLowSpaceNotification(TUint, TRequestStatus &)

IMPORT_C voidRequestLowSpaceNotification(TUintaFreeBuffers,
TRequestStatus &aStatus
)

Requests a notification when the number of free buffers in the pool falls to the level specified.

Parameters

TUint aFreeBuffersSpecifies the number of free buffers that will trigger completion of the notification.
TRequestStatus & aStatusStatus request to be completed when the condition is met.

SetBufferWindow(TInt, TBool)

IMPORT_C TIntSetBufferWindow(TIntaCount,
TBoolaAutoMap
)

Specifies how many buffers of a page-aligned pool this process will require concurrent access to.

This determines how much of the process's address space will be allocated for buffers of this pool.

Pre-condition
the pool's buffers must be page-aligned

Parameters

TInt aCountSpecifies the number of buffers to map into the process's virtual address space (-1 specifies that all buffers will be mapped).
TBool aAutoMapETrue specifies that an allocated or received buffer will be automatically mapped into the process's address space.