TThreadCreateInfo Struct Reference

#include <e32std.h>

struct TThreadCreateInfo

Detailed Description

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

Member Attribute Documentation

iAttributes

TUint iAttributes[protected]

The attributes of the thread

iFunction

TThreadFunction iFunction[protected]

The function this thread will execute.

iHeap

RAllocator *iHeap[protected]

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

iHeapMaxSize

TInt iHeapMaxSize[protected]

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

iHeapMinSize

TInt iHeapMinSize[protected]

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

iName

const TDesC *iName[protected]

The Name to be given to the thread to be created

iOwner

TOwnerType iOwner[protected]

The owner of the thread to be created.

iParameter

TAny *iParameter[protected]

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

iSpare

TUint32 iSpare[protected]

iStackSize

TInt iStackSize[protected]

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

iVersionNumber

TUint iVersionNumber[protected]

The version number of this TChunkCreateInfo.

Member Enumeration Documentation

Enum TThreadCreateVersions

Currently supported version numbers

EnumeratorValueDescription
EVersion0
ESupportedVersions

Enum TThreadPagingAtt

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

EnumeratorValueDescription
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.

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().

ParameterDescription
aNameThe name to be assigned to the thread. KNullDesC, to create an anonymous thread.
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.
aStackSizeThe size of the new thread's stack. This must be at least 512 bytes, otherwise RThread::Create() will fail with KErrArgument.
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 Function Documentation

SetCreateHeap ( TInt, TInt )

IMPORT_C voidSetCreateHeap(TIntaHeapMinSize,
TIntaHeapMaxSize
)

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

ParameterDescription
aHeapMinSizeThe minimum size for the new thread's heap.
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.

ParameterDescription
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.

ParameterDescription
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.

ParameterDescription
aHeapA pointer to the handle of the heap belonging to another thread which this thread is to use.