#include <e32std.h>
struct TThreadCreateInfo |
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 |
Public Member Enumerations | |
---|---|
enum | TThreadCreateVersions { EVersion0, ESupportedVersions } |
enum | TThreadPagingAtt { EUnspecified, EPaged, EUnpaged } |
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 *) |
This structure specifies the type and properties of the thread to be created. It is passed as a parameter to the RThread::Create() method.
RAllocator * | iHeap | [protected] |
The heap for the thread to be created to use. NULL if a new heap is to be created.
TAny * | iParameter | [protected] |
The parameter to be passed to the function of the thread to be created.
TUint32 | iSpare | [protected] |
Currently supported version numbers
Enumerator | Value | Description |
---|---|---|
EVersion0 | ||
ESupportedVersions |
Attributes that specify whether the stack and heap of the thread to be created are data paged or not.
Enumerator | Value | Description |
---|---|---|
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. |
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().
Parameters | |
---|---|
aName | The name to be assigned to the thread. KNullDesC, to create an anonymous thread. |
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. |
aStackSize | The size of the new thread's stack. This must be at least 512 bytes, otherwise RThread::Create() will fail with KErrArgument. |
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 | 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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
aHeap | A pointer to the handle of the heap belonging to another thread which this thread is to use. |