TThreadCreateInfo Struct Reference

struct TThreadCreateInfo

This structure specifies the type and properties of the thread to be created. It is passed as a parameter to the RThread::Create() method.

Constructor & Destructor Documentation

TThreadCreateInfo(const TDesC &, TThreadFunction, TInt, TAny *)

IMPORT_CTThreadCreateInfo(const TDesC &aName,
TThreadFunctionaFunction,
TIntaStackSize,
TAny *aPtr
)

Constructor where the basic properties of the thread to be created are specified.

NOTE - TThreadCreateInfo::SetCreateHeap() or TThreadCreateInfo::SetUseHeap() must be invoked on this TThreadCreateInfo to set the type of the thread to be created before being passed as a paramter to RThread::Create().

Parameters

const TDesC & aNameThe name to be assigned to the thread. KNullDesC, to create an anonymous thread.
TThreadFunction aFunctionA pointer to a function. Control passes to this function when the thread is first resumed, i.e. when the thread is initially scheduled to run.
TInt aStackSizeThe size of the new thread's stack. This must be at least 512 bytes, otherwise RThread::Create() will fail with KErrArgument.
TAny * aPtrA pointer to data to be passed as a parameter to the thread function when the thread is initially scheduled to run. If the thread function does not need any data then this pointer can be NULL.

Member Functions Documentation

SetCreateHeap(TInt, TInt)

IMPORT_C voidSetCreateHeap(TIntaHeapMinSize,
TIntaHeapMaxSize
)

Sets the thread to be created to create its own heap.

Parameters

TInt aHeapMinSizeThe minimum size for the new thread's heap.
TInt aHeapMaxSizeThe maximum size for the new thread's heap.

SetOwner(const TOwnerType)

IMPORT_C voidSetOwner(const TOwnerTypeaOwner)

Sets the owner the thread to be created. Any previous calls to this method will be overridden for this TThreadCreateInfo object.

Parameters

const TOwnerType aOwnerThe owner of the thread to be created.

SetPaging(const TThreadPagingAtt)

IMPORT_C voidSetPaging(const TThreadPagingAttaPaging)

Sets the data paging attributes of the thread to be created. Any previous calls to this method will be overridden for this TThreadCreateInfo object.

Parameters

const TThreadPagingAtt aPagingThe paging attributes for the thread to be created.

SetUseHeap(const RAllocator *)

IMPORT_C voidSetUseHeap(const RAllocator *aHeap)

Sets the thread to be created to use the heap whose handle is pointed to by aAllocator. If this is NULL, then the thread uses the heap of the creating thread.

Parameters

const RAllocator * aHeapA pointer to the handle of the heap belonging to another thread which this thread is to use.

Member Enumerations Documentation

Enum TThreadCreateVersions

Currently supported version numbers

Enumerators

EVersion0
ESupportedVersions

Enum TThreadPagingAtt

Attributes that specify whether the stack and heap of the thread to be created are data paged or not.

Enumerators

EUnspecified

The thread will use the creating process's paging attributes.

EPaged

The thread will data page its stack and heap.

EUnpaged

The thread will not data page its stack and heap.

Member Data Documentation

TUint iAttributes

TUint iAttributes[protected]

The attributes of the thread

TThreadFunction iFunction

TThreadFunction iFunction[protected]

The function this thread will execute.

RAllocator * iHeap

RAllocator *iHeap[protected]

The heap for the thread to be created to use. NULL if a new heap is to be created.

TInt iHeapMaxSize

TInt iHeapMaxSize[protected]

Maximum size of any heap to be created for the thread.

TInt iHeapMinSize

TInt iHeapMinSize[protected]

Minimum size of any heap to be created for the thread.

const TDesC * iName

const TDesC *iName[protected]

The Name to be given to the thread to be created

TOwnerType iOwner

TOwnerType iOwner[protected]

The owner of the thread to be created.

TAny * iParameter

TAny *iParameter[protected]

The parameter to be passed to the function of the thread to be created.

TUint32 iSpare

TUint32 iSpare[protected]

TInt iStackSize

TInt iStackSize[protected]

The size of the stack of the thread to be created.

TUint iVersionNumber

TUint iVersionNumber[protected]

The version number of this TChunkCreateInfo.