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.
Public Member Functions | |
---|---|
TThreadCreateInfo (const TDesC &, TThreadFunction , TInt , TAny *) | |
IMPORT_C void | SetCreateHeap ( TInt , TInt ) |
IMPORT_C void | SetOwner (const TOwnerType ) |
IMPORT_C void | SetPaging (const TThreadPagingAtt ) |
IMPORT_C void | SetUseHeap (const RAllocator *) |
Public Member Enumerations | |
---|---|
enum | TThreadCreateVersions { EVersion0 , ESupportedVersions } |
enum | TThreadPagingAtt { EUnspecified , EPaged , EUnpaged } |
Protected Attributes | |
---|---|
TUint | iAttributes |
TThreadFunction | iFunction |
RAllocator * | iHeap |
TInt | iHeapMaxSize |
TInt | iHeapMinSize |
const TDesC * | iName |
TOwnerType | iOwner |
TAny * | iParameter |
TUint32 | iSpare |
TInt | iStackSize |
TUint | iVersionNumber |
IMPORT_C | TThreadCreateInfo | ( | const TDesC & | aName, |
TThreadFunction | aFunction, | |||
TInt | aStackSize, | |||
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() .
const TDesC & aName | The name to be assigned to the thread. KNullDesC, to create an anonymous thread. |
TThreadFunction aFunction | A 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 aStackSize | The size of the new thread's stack. This must be at least 512 bytes, otherwise RThread::Create() will fail with KErrArgument. |
TAny * aPtr | A 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. |
IMPORT_C void | SetCreateHeap | ( | TInt | aHeapMinSize, |
TInt | aHeapMaxSize | |||
) |
Sets the thread to be created to create its own heap.
IMPORT_C void | SetOwner | ( | const TOwnerType | aOwner | ) |
Sets the owner the thread to be created. Any previous calls to this method will be overridden for this TThreadCreateInfo object.
const TOwnerType aOwner | The owner of the thread to be created. |
IMPORT_C void | SetPaging | ( | const TThreadPagingAtt | aPaging | ) |
Sets the data paging attributes of the thread to be created. Any previous calls to this method will be overridden for this TThreadCreateInfo object.
const TThreadPagingAtt aPaging | The paging attributes for the thread to be created. |
IMPORT_C void | SetUseHeap | ( | 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.
const RAllocator * aHeap | A pointer to the handle of the heap belonging to another thread which this thread is to use. |
Currently supported version numbers
EVersion0 | |
ESupportedVersions |
Attributes that specify whether the stack and heap of the thread to be created are data paged or not.
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. |
TThreadFunction | iFunction | [protected] |
The function this thread will execute.
RAllocator * | iHeap | [protected] |
The heap for the thread to be created to use. NULL if a new heap is to be created.
TInt | iHeapMaxSize | [protected] |
Maximum size of any heap to be created for the thread.
TInt | iHeapMinSize | [protected] |
Minimum size of any heap to be created for the thread.
const TDesC * | iName | [protected] |
The Name to be given to the thread to be created
TAny * | iParameter | [protected] |
The parameter to be passed to the function of the thread to be created.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.