|
||
class User : public UserHeap;
Set of static user functions.
These functions are related to a number of System component APIs.
The majority of the functions are related to either the current thread, or its heap. Examples in this category include User::Exit(TInt)
, which causes the thread to terminate, and User::Alloc(TInt)
, which allocates memory from the current thread's heap.
Some of these functions are equivalent to functions in the RThread
or RHeap
classes. In these cases, the User function is a convenient way to access the function without first having to get a handle
to the current thread.
Functions are also provided to support debugging of memory leaks. These function calls can be written explicitly or can be generated using a corresponding macro - the advantage of using a macro is that the function call is only generated for debug builds.
A final category of functions, which includes User::BinarySearch(TInt,const TKey &,TInt &)
and User::QuickSort(TInt,const TKey &,const TSwap &)
, are just useful functions which have no other natural home.
UserHeap
- A set of static functions for constructing fixed length heaps and local or globa...
User
-
Set of static user functions.
Defined in User
:
After(TTimeIntervalMicroSeconds32)
Suspends the current thread until a specified time interval has expired.AfterHighRes(TTimeIntervalMicroSeconds32)
Suspends the current thread until a specified time interval has expired to a res...Alloc(TInt)
Allocates a cell of specified size from the current thread's heap.AllocL(TInt)
Allocates a cell of specified size from the current thread's heap, and leaves if...AllocLC(TInt)
Allocates a cell of specified size from the current thread's default heap, and, ...AllocLen(const TAny *)
Gets the length of the specified allocated heap cell.AllocSize(TInt &)
Gets the total number of cells allocated on the current thread's default heap, a...AllocZ(TInt)
Allocates a cell of specified size from the current thread's default heap, and c...AllocZL(TInt)
Allocates a cell of specified size from the current thread's default heap, clear...Allocator()
Gets the current thread's default current heap.At(const TTime &)
Suspends the current thread until the specified absolute time.Available(TInt &)
Gets the total free space currently available on the current thread's default he...Beep(TInt,TTimeIntervalMicroSeconds32)
Makes a beep tone with a specified frequency and duration.BinarySearch(TInt,const TKey &,TInt &)
Performs a binary search for an array element containing a specified key.Check()
Checks the validity of the current thread's default heap.Collate(TUint)
Converts the character to its collated form.CommandLine(TDes &)
Gets a copy of the data which is passed as an argument to the thread function of...CommandLineLength()
Gets the length of the data which is passed as an argument to the thread functio...CompressAllHeaps()
Compresses all the chunks containing heaps.CountAllocCells()
Gets the total number of cells allocated on the current thread's default heap.CountAllocCells(TInt &)
Gets the the total number of cells allocated, and the number of free cells, on t...CreatorHasCapability(TCapability,TCapability,const char *)
Check if the process that created the current process has both of the given capa...CreatorHasCapability(TCapability,const char *)
Check if the process that created the current process has a given capabilityCreatorIdentity()
CreatorSecureId()
Return the Secure ID of the process that created the current process. CreatorVendorId()
Return the Vendor ID of the process that created the current process. Critical()
Gets the critical state associated with the current thread.Critical(RThread)
Gets the critical state associated with the specified thread.EAllThreadsCritical
This value can only be passed to User::SetProcessCritical(TCritical) and affects...ENotCritical
This value can be passed to both:EProcessCritical
This value can only be passed to User::SetCritical(TCritical) and affects the cu...EProcessPermanent
This value can only be passed to User::SetCritical(TCritical) and affects the cu...ERealtimeStateOff
Thread is not realtime ERealtimeStateOn
Thread is realtime ERealtimeStateWarn
Thread is realtime but doesn't want this enforced ESystemCritical
This value can be passed to both: User::SetCritical(TCritical) and User::SetProc...ESystemPermanent
This value can be passed to both: User::SetCritical(TCritical) and User::SetProc...ExceptionHandler()
Gets a pointer to the exception handler for the current thread.Exit(TInt)
Terminates the current thread, specifying a reason. All child threads are termin...FastCounter()
Gets the fast counter.Fold(TUint)
Folds the specified character.Fold(TUint,TInt)
Folds the character according to a specified folding method.Free(TAny *)
Frees the specified cell and returns it to the current thread's default heap.FreeLogicalDevice(const TDesC &)
Frees the logical device driver DLL associated with a specified driver name.FreePhysicalDevice(const TDesC &)
Frees the physical device driver DLL associated with a specified driver name.FreeZ(TAny *&)
Frees the specified cell, returns it to the current thread's default heap, and r...GetDesParameter(TInt,TDes16 &)
Gets the specified environment data item belonging to the current process; this ...GetDesParameter(TInt,TDes8 &)
Gets the specified environment data item belonging to the current process; this ...GetTIntParameter(TInt,TInt &)
Gets the specified environment data item belonging to the current process; this ...Heap()
Gets a reference to the handle to the current thread's heap.IMB_Range(TAny *,TAny *)
Does the necessary preparations to guarantee correct execution of code in the sp...Identity()
InactivityTime()
Gets the time since the last user activity.InfoPrint(const TDesC &)
Invokes the notifier server to display a text message on the screen for a short ...Invariant()
Panics the current thread with a USER 0 panic.IsExceptionHandled(TExcType)
Tests whether the specified exception type can be handled by the current thread.IsRomAddress(TBool &,TAny *)
Tests whether the specified address is in the ROM.JustInTime()
Tests whether just-in-time debugging is on or off.Language()
Gets the language of the current locale.Leave(TInt)
Leaves the currently executing function, unwinds the call stack, and returns fro...LeaveIfError(TInt)
Leaves or returns with a specified reason code.LeaveIfNull(TAny *)
Leaves with the reason code KErrNoMemory, if the specified pointer is NULL.LeaveNoMemory()
Leaves with the specific reason code KErrNoMemory.LoadLogicalDevice(const TDesC &)
Loads the logical device driver (LDD) DLL with the specified filename.LoadPhysicalDevice(const TDesC &)
Loads the physical device driver (PDD) DLL with the specified filename.LockPeriod()
Returns which of the periods the clock is currently in.LockedDec(TInt &)
Decrements a TInt value by 1 when the current thread is locked to prevent re-ent...LockedInc(TInt &)
Increments a TInt value by 1 when the current thread is locked to prevent re-ent...LowerCase(TUint)
Converts the specified character to lower case.MachineConfiguration(TDes8 &,TInt &)
Gets the machine configuration.ModifyExceptionMask(TUint32,TUint32)
Changes the set of exceptions which the current thread's exception handler can d...NTickCount()
Gets the nanokernel tick count.Panic(const TDesC &,TInt)
Panics the current thread, specifying a category name and panic number.ParameterLength(TInt)
Gets the length of the specified item of environment data belonging to the curre...PriorityControl()
Tests whether the current process allows other processes to switch its priority ...ProcessCritical()
Gets the critical state associated with the current process.ProcessCritical(RProcess)
Gets the critical state associated with the specified process.QueryVersionSupported(const TVersion &,const TVersion &)
Compares two version objects and returns true if the test version is less than t...QuickSort(TInt,const TKey &,const TSwap &)
Quick sorts array elements.RaiseException(TExcType)
Raises an exception of a specified type on the current thread.ReAlloc(TAny *,TInt,TInt)
Increases or decreases the size of an existing cell in the current thread's heap...ReAllocL(TAny *,TInt,TInt)
Increases or decreases the size of an existing cell, and leaves if there is insu...RenameProcess(const TDesC &)
Assigns a new name to the current process, replacing any existing name.RenameThread(const TDesC &)
Assigns a new name to the current thread, replacing any existing name that may h...RequestComplete(TRequestStatus *&,TInt)
Signals the current thread that the asynchronous request associated with the spe...ResetInactivityTime()
Resets all user inactivity timers. SafeDec(TInt &)
Atomically decrements the specified value by 1, if the value is > 0.SafeInc(TInt &)
Atomically increments the specified value by 1, if the value is > 0.SetCritical(TCritical)
Sets up or changes the effect that termination of the current thread has, either...SetCurrencySymbol(const TDesC &)
Sets the system wide currency symbol.SetDebugMask(TUint32)
Sets the debug mask.SetDebugMask(TUint32,TUint)
Sets the debug mask at the given indexSetExceptionHandler(TExceptionHandler,TUint32)
Sets a new exception handler for the current thread. Note that the handler is no...SetFloatingPointMode(TFloatingPointMode,TFloatingPointRoundingMode)
Sets the hardware floating point mode for the current thread. This does not affe...SetHomeTime(const TTime &)
Sets the home time to a specified time value.SetHomeTimeSecure(const TTime &)
Sets the secure home time to a specified time value.SetJustInTime(const TBool)
Sets just-in-time debugging for this process on or off.SetMachineConfiguration(const TDesC8 &)
Sets the machine configuration.SetPriorityControl(TBool)
Allows the current process to choose to have its priority switched by another pr...SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...SetTrapHandler(TTrapHandler *)
Sets the current thread's trap handler and returns a pointer to any pre-existing...SetUTCOffset(TTimeIntervalSeconds)
Sets the UTC offset to the given number of seconds. This should include both tim...SetUTCTime(const TTime &)
Sets the UTC time to a specified time value.SetUTCTimeAndOffset(const TTime &,TTimeIntervalSeconds)
Sets the UTC time and UTC offset to the specified values, atomically. This is eq...SetUTCTimeSecure(const TTime &)
Sets the secure UTC time to a specified time value.StringLength(const TUint16 *)
Gets the length of a C style, null terminated, string of double-byte valued char...StringLength(const TUint8 *)
Gets the length of a C style, null terminated, string of single-byte valued char...SwitchAllocator(RAllocator *)
Changes the current thread's heap.SwitchHeap(RAllocator *)
Changes the current thread's heap.TCritical
A set of values that defines the effect that terminating a thread has, either on...TRealtimeState
A threads realtime state. Some non-realtime behaviour can be detected by the ker...TickCount()
Gets the current tick count.TitleCase(TUint)
Converts a specified character to its title case version.TrapHandler()
Gets a pointer to the current thread's trap handler.UTCOffset()
Gets the UTC offset - the difference between UTC and the current local time due ...UpperCase(TUint)
Converts a specified character to upper case.ValidateName(const TDesC &)
Checks whether a specified name is a valid CObject name.Version()
Retrieves the E32 component version number, which is the kernel architecture ver...WaitForAnyRequest()
Waits for any asynchronous request to complete.WaitForNRequest(TRequestStatus *,TInt)
Waits for any one of specific asynchronous requests to complete.WaitForRequest(TRequestStatus &)
Waits for a specific asynchronous request to complete.WaitForRequest(TRequestStatus &,TRequestStatus &)
Waits for either of two specific asynchronous requests to complete.__DbgCheckFailure(TBool)
Returns the number of heap allocation failures the current debug allocator fail ...__DbgMarkCheck(TBool,TBool,TInt,const TUint8 *,TInt)
Checks the current number of allocated heap cells for the current thread's defau...__DbgMarkEnd(TBool,TInt)
Marks the end of heap cell checking at the current nested level for the current ...__DbgMarkStart(TBool)
Marks the start of heap cell checking for the current thread's default heap, or ...Inherited from UserHeap
:
ChunkHeap(RChunk,TInt,TInt,TInt,TInt,TBool,TUint32)
Creates a heap in an existing chunk.ChunkHeap(const TDesC *,TInt,TInt,TInt,TInt,TBool)
Creates a heap in a local or global chunk.EChunkHeapDuplicate
EChunkHeapSwitchTo
FixedHeap(TAny *,TInt,TInt,TBool)
Creates a fixed length heap at a specified location.OffsetChunkHeap(RChunk,TInt,TInt,TInt,TInt,TInt,TBool,TUint32)
Creates a heap in an existing chunk, offset from the beginning of the chunk.TChunkHeapCreateMode
RThread
A handle to a thread.IMPORT_C static void Exit(TInt aReason);
Terminates the current thread, specifying a reason. All child threads are terminated and all resources are cleaned up.
If the current thread is the main thread in a process, the process is also terminated.
|
IMPORT_C static void Panic(const TDesC &aCategory, TInt aReason);
Panics the current thread, specifying a category name and panic number.
Keep the length of the category name small; a length of 16 is ideal.
|
IMPORT_C static void Leave(TInt aReason);
Leaves the currently executing function, unwinds the call stack, and returns from the most recently entered trap harness.
|
IMPORT_C static void LeaveNoMemory();
Leaves with the specific reason code KErrNoMemory.
KErrNoMemory
System wide error code -4 : an attempt to allocate memory has failed.IMPORT_C static TInt LeaveIfError(TInt aReason);
Leaves or returns with a specified reason code.
If the reason code is negative the function leaves, and the reason code is returned through the trap harness.
If the reason code is zero or positive, the function simply returns with the reason value.
|
|
IMPORT_C static TAny* LeaveIfNull(TAny *aPtr);
Leaves with the reason code KErrNoMemory, if the specified pointer is NULL.
If the pointer is not NULL, the function simply returns with the value of the pointer.
|
|
IMPORT_C static TTrapHandler* SetTrapHandler(TTrapHandler *aHandler);
Sets the current thread's trap handler and returns a pointer to any pre-existing trap handler.
Pass a NULL pointer to this function to clear the trap handler.
The trap handler works with the TRAP mechanism to handle the effects of a leave.
Note that TTrapHandler
is an abstract base class; a trap handler must be implemented as a derived class.
|
|
IMPORT_C static TTrapHandler* TrapHandler();
Gets a pointer to the current thread's trap handler.
Note that TTrapHandler
is an abstract base class; a trap handler must be implemented as a derived class.
|
IMPORT_C static TInt InfoPrint(const TDesC &aDes);
Invokes the notifier server to display a text message on the screen for a short time.
|
|
RNotifier
A handle to a session with the extended notifier server that provides support fo...IMPORT_C static void RequestComplete(TRequestStatus *&aStatus, TInt aReason);
Signals the current thread that the asynchronous request associated with the specified request status object is complete.
This function is used to complete an asynchronous request originating in the same thread as the code that is currently executing.
If a request originates in another thread, then executing code must use RThread::RequestComplete(TRequestStatus *&,TInt)const
to signal the completion of that request.
The request is completed with the completion code passed in aReason. This value is copied into the request status, pointed to by aStatus, before signalling the current thread's request semaphore.
The meaning of the completion code passed in aReason is a matter of convention to be decided between the service requester and the service provider.
|
RThread::RequestComplete(TRequestStatus *&,TInt)const
Signals this thread that an asynchronous request originating from this thread, i...IMPORT_C static void WaitForAnyRequest();
Waits for any asynchronous request to complete.
The current thread waits on its request semaphore.
The function completes, and control returns to the caller when the current thread's request semaphore is signalled by any of the service providers which handle these asynchronous requests.
The request status of all outstanding asynchronous requests must be examined to determine which request is complete.
IMPORT_C static void WaitForRequest(TRequestStatus &aStatus);
Waits for a specific asynchronous request to complete.
The current thread waits on its request semaphore.
The function completes and control returns to the caller when the current thread's request semaphore is signalled by the service provider handling the request associated with aStatus. Before signalling, the service provider sets an appropriate value in aStatus, other than KRequestPending.
Note that if other asynchronous requests complete before the one associated with aStatus, the request semaphore is adjusted
so that knowledge of their completion is not lost. In this a case, a subsequent call to User::WaitForAnyRequest()
or User::WaitForRequest(TRequestStatus &)
will complete and return immediately.
|
IMPORT_C static void WaitForRequest(TRequestStatus &aStatus1, TRequestStatus &aStatus2);
Waits for either of two specific asynchronous requests to complete.
The current thread waits on its request semaphore.
The function completes and control returns to the caller when the current thread's request semaphore is signalled by either the service provider handling the request associated with aStatus1 or the service provider handling the request associated with aStatus2. Before signalling, the completing service provider sets an appropriate value in the status object, other than KRequestPending.
Note that if other asynchronous requests complete before the ones associated with aStatus1 and aStatus2, the request semaphore
is adjusted so that knowledge of their completion is not lost. In this a case, a subsequent call to User::WaitForAnyRequest()
or User::WaitForRequest(TRequestStatus &)
will complete and return immediately.
|
IMPORT_C static void WaitForNRequest(TRequestStatus *aStatusArray[], TInt aNum);
Waits for any one of specific asynchronous requests to complete.
The current thread waits on its request semaphore.
The function completes and control returns to the caller when the current thread's request semaphore is signalled by either the service provider handling the request associated with aStatus1 or the service provider handling the request associated with aStatus2. Before signalling, the completing service provider sets an appropriate value in the status object, other than KRequestPending.
Note that if other asynchronous requests complete before the ones associated with aStatusArray the request semaphore is adjusted
so that knowledge of their completion is not lost. In this a case, a subsequent call to User::WaitForAnyRequest()
or User::WaitForRequest(TRequestStatus &)
will complete and return immediately.
|
IMPORT_C static TInt AllocLen(const TAny *aCell);
Gets the length of the specified allocated heap cell.
The cell is assumed to be in the current thread's heap.
|
|
IMPORT_C static TAny* Alloc(TInt aSize);
Allocates a cell of specified size from the current thread's heap.
If there is insufficient memory available on the heap from which to allocate a cell of the required size, the function returns NULL.
The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
|
|
|
IMPORT_C static TAny* AllocL(TInt aSize);
Allocates a cell of specified size from the current thread's heap, and leaves if there is insufficient memory in the heap.
The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
|
|
|
IMPORT_C static TAny* AllocLC(TInt aSize);
Allocates a cell of specified size from the current thread's default heap, and, if successful, places a pointer to the cell onto the cleanup stack.
The function leaves if there is insufficient memory in the heap.
The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
|
|
|
IMPORT_C static TAny* AllocZ(TInt aSize);
Allocates a cell of specified size from the current thread's default heap, and clears it to binary zeroes.
If there is insufficient memory available on the heap from which to allocate a cell of the required size, the function returns NULL.
The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
|
|
|
IMPORT_C static TAny* AllocZL(TInt aSize);
Allocates a cell of specified size from the current thread's default heap, clears it to binary zeroes, and leaves if there is insufficient memory in the heap.
The resulting size of the allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
|
|
|
IMPORT_C static TInt AllocSize(TInt &aTotalAllocSize);
Gets the total number of cells allocated on the current thread's default heap, and the total space allocated to them.
|
|
IMPORT_C static TInt Available(TInt &aBiggestBlock);
Gets the total free space currently available on the current thread's default heap, and the space available in the largest free block.
The space available represents the total space which can be allocated.
Note that compressing the heap may reduce the total free space available and the space available in the largest free block.
|
|
IMPORT_C static TInt CountAllocCells();
Gets the total number of cells allocated on the current thread's default heap.
|
IMPORT_C static TInt CountAllocCells(TInt &aFreeCount);
Gets the the total number of cells allocated, and the number of free cells, on the current thread's default heap.
|
|
IMPORT_C static void Free(TAny *aCell);
Frees the specified cell and returns it to the current thread's default heap.
|
|
IMPORT_C static void FreeZ(TAny *&aCell);
Frees the specified cell, returns it to the current thread's default heap, and resets the pointer to NULL.
|
|
IMPORT_C static RAllocator& Allocator();
Gets the current thread's default current heap.
|
static inline RHeap& Heap();
Gets a reference to the handle to the current thread's heap.
|
IMPORT_C static TAny* ReAlloc(TAny *aCell, TInt aSize, TInt aMode=0);
Increases or decreases the size of an existing cell in the current thread's heap.
If the cell is being decreased in size, then it is guaranteed not to move, and the function returns the pointer originally passed in aCell. Note that the length of the cell will be the same if the difference between the old size and the new size is smaller than the minimum cell size.
If the cell is being increased in size, i.e. aSize is bigger than its current size, then the function tries to grow the cell in place. If successful, then the function returns the pointer originally passed in aCell. If unsuccessful, then:
if the cell cannot be moved, i.e. aMode has the ENeverMove bit set, then the function returns NULL.
if the cell can be moved, i.e. aMode does not have the ENeverMove bit set, then the function tries to allocate a new replacement cell, and, if successful, returns a pointer to the new cell; if unsuccessful, it returns NULL.
Note that in debug mode, the function returns NULL if the cell cannot be grown in place, regardless of whether the ENeverMove bit is set.
If the reallocated cell is at a different location from the original cell, then the content of the original cell is copied to the reallocated cell.
If the supplied pointer, aCell is NULL, then the function attempts to allocate a new cell, but only if the cell can be moved, i.e. aMode does not have the ENeverMove bit set.
Note the following general points:
If reallocation fails, the content of the original cell is preserved.
The resulting size of the re-allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
|
|
|
RAllocator::TReAllocMode
Flags controlling reallocation.IMPORT_C static TAny* ReAllocL(TAny *aCell, TInt aSize, TInt aMode=0);
Increases or decreases the size of an existing cell, and leaves if there is insufficient memory in the current thread's default heap.
If the cell is being decreased in size, then it is guaranteed not to move, and the function returns the pointer originally passed in aCell. Note that the length of the cell will be the same if the difference between the old size and the new size is smaller than the minimum cell size.
If the cell is being increased in size, i.e. aSize is bigger than its current size, then the function tries to grow the cell in place. If successful, then the function returns the pointer originally passed in aCell. If unsuccessful, then:
if the cell cannot be moved, i.e. aMode has the ENeverMove bit set, then the function leaves.
if the cell can be moved, i.e. aMode does not have the ENeverMove bit set, then the function tries to allocate a new replacement cell, and, if successful, returns a pointer to the new cell; if unsuccessful, it leaves.
Note that in debug mode, the function leaves if the cell cannot be grown in place, regardless of whether the ENeverMove bit is set.
If the reallocated cell is at a different location from the original cell, then the content of the original cell is copied to the reallocated cell.
If the supplied pointer, aCell is NULL, then the function attempts to allocate a new cell, but only if the cell can be moved, i.e. aMode does not have the ENeverMove bit set.
Note the following general points:
If reallocation fails, the content of the original cell is preserved.
The resulting size of the re-allocated cell may be rounded up to a value greater than aSize, but is guaranteed to be not less than aSize.
|
|
|
RAllocator::TReAllocMode
Flags controlling reallocation.IMPORT_C static RAllocator* SwitchAllocator(RAllocator *aAllocator);
Changes the current thread's heap.
|
|
static inline RHeap* SwitchHeap(RAllocator *aHeap);
Changes the current thread's heap.
|
|
Interface status: | deprecated | This function is no longer supported, and calling it has no effect. |
IMPORT_C static TInt CompressAllHeaps();
Compresses all the chunks containing heaps.
|
IMPORT_C static void After(TTimeIntervalMicroSeconds32 aInterval);
Suspends the current thread until a specified time interval has expired.
The resolution of the timer depends on the hardware, but is normally 1 Symbian OS tick (approximately 1/64 second).
|
|
IMPORT_C static TInt At(const TTime &aTime);
Suspends the current thread until the specified absolute time.
If the machine is off at that time, the machine will be turned on again.
KErrNone - suspension of the current thread completed normally at the requested time.
KErrAbort - suspension of the current thread was aborted because the system time changed.
KErrUnderflow - the requested completion time is in the past.
KErrOverFlow - the requested completion time is too far in the future.
|
|
IMPORT_C static void AfterHighRes(TTimeIntervalMicroSeconds32 aInterval);
Suspends the current thread until a specified time interval has expired to a resolution of 1ms .
|
|
Interface status: | deprecated | Set the time using User::SetUTCTime if the UTC time is known; otherwise, use the timezone server to set the time. |
Capability: | WriteDeviceData |
IMPORT_C static TInt SetHomeTime(const TTime &aTime);
Sets the home time to a specified time value.
|
|
Capability: | TCB | |
Capability: | WriteDeviceData |
IMPORT_C static TInt SetHomeTimeSecure(const TTime &aTime);
Sets the secure home time to a specified time value.
|
|
Capability: | WriteDeviceData |
IMPORT_C static TInt SetUTCTime(const TTime &aUTCTime);
Sets the UTC time to a specified time value.
|
|
Capability: | TCB | |
Capability: | WriteDeviceData |
IMPORT_C static TInt SetUTCTimeSecure(const TTime &aUTCTime);
Sets the secure UTC time to a specified time value.
|
|
IMPORT_C static TTimeIntervalSeconds UTCOffset();
Gets the UTC offset - the difference between UTC and the current local time due to any time zones and daylight savings time that may be in effect. A positive offset indicates a time ahead of UTC, a negative offset indicates a time behind UTC.
|
Capability: | WriteDeviceData |
IMPORT_C static void SetUTCOffset(TTimeIntervalSeconds aOffset);
Sets the UTC offset to the given number of seconds. This should include both time zone differences and the effect of any applicable daylight savings time. A positive offset indicates a time ahead of UTC, a negative offset indicates a time behind UTC.
|
Capability: | WriteDeviceData |
IMPORT_C static TInt SetUTCTimeAndOffset(const TTime &aUTCTime, TTimeIntervalSeconds aOffset);
Sets the UTC time and UTC offset to the specified values, atomically. This is equivalent to calling both SetUTCTime and SetUTCOffset, but without the possibility of an incorrect time being observed between the two calls. If the operation is not successful, an error code will be returned and both the time and offset will be left unchanged.
|
|
Capability: | WriteDeviceData |
IMPORT_C static TInt SetCurrencySymbol(const TDesC &aSymbol);
Sets the system wide currency symbol.
On successful return from this function, a call to the Set() member function of a TCurrencySymbol
object fetches the new currency symbol.
|
|
|
TCurrencySymbol::Set()
Re-retrieves the current locale's currency symbol(s). IMPORT_C static TInt SetFloatingPointMode(TFloatingPointMode aMode, TFloatingPointRoundingMode aRoundingMode=EFpRoundToNearest);
Sets the hardware floating point mode for the current thread. This does not affect software floating point calculations. The rounding mode can also be set. New threads created by this thread will inherit the mode, thus to set the mode for a whole process, call this method before you create any new threads.
|
|
IMPORT_C static TUint TickCount();
Gets the current tick count.
The period between ticks is usually 1/64 second, but may be hardware dependent.
|
IMPORT_C static TUint32 NTickCount();
Gets the nanokernel tick count.
This is the current value of the machine's millisecond tick counter.
On the emulator the resolution defaults to 5 milliseconds; however you can change it to N milliseconds when you launch the emulator from the command line by specifying -Dtimerresolution=N as a parameter to epoc.exe, for example:
epoc.exe -Dtimerresolution=3
On most hardware the resolution is about 1 millisecond.
You can get the nanokernel tick period in microseconds by calling into the Hardware Abstraction Layer:
TInt nanokernel_tick_period;
HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
|
IMPORT_C static TTimerLockSpec LockPeriod();
Returns which of the periods the clock is currently in.
|
IMPORT_C static TTimeIntervalSeconds InactivityTime();
Gets the time since the last user activity.
|
IMPORT_C static TUint32 FastCounter();
Gets the fast counter.
This is the current value of the machine's high resolution timer. If a high resolution timer is not available, it uses the millisecond timer instead.
The freqency of this counter can be determined by reading the HAL
attribute EFastCounterFrequency.
This function is intended for use in profiling and testing; it should not be used in production code. User::NTickCount()
should be used instead.
This is because the implementation of the FastCounter is platform-specific: its frequency can be anywhere from a few KHz to many MHz. It may also not be activated when needed, since it is expensive in terms of clock cycles and battery life, and use of a platform-specific API may be necessary to enable it.
|
User::NTickCount()
Gets the nanokernel tick count.IMPORT_C static TInt LockedInc(TInt &aValue);
Increments a TInt value by 1 when the current thread is locked to prevent re-entrancy.
The increment to aValue is done while the current thread is locked; i.e. no other thread is permitted to run until the sequence of instructions which increment aValue have completed. Hence the function gives controlled access to a TInt variable which may be in a memory location accessible to more than one thread.
As an example of its use, the function is used in the implementation of critical sections.
|
|
User::LockedDec(TInt &)
Decrements a TInt value by 1 when the current thread is locked to prevent re-ent...IMPORT_C static TInt LockedDec(TInt &aValue);
Decrements a TInt value by 1 when the current thread is locked to prevent re-entrancy.
The decrement from aValue is done while the current thread is locked; i.e. no other thread is permitted to run until the sequence of instructions which decrement aValue have completed. Hence the function gives controlled access to a TInt variable which may be in a memory location accessible to more than one thread.
As an example of its use, the function is used in the implementation of critical sections.
|
|
User::LockedInc(TInt &)
Increments a TInt value by 1 when the current thread is locked to prevent re-ent...IMPORT_C static TInt SafeInc(TInt &aValue);
Atomically increments the specified value by 1, if the value is > 0.
|
|
IMPORT_C static TInt SafeDec(TInt &aValue);
Atomically decrements the specified value by 1, if the value is > 0.
|
|
IMPORT_C static TInt Beep(TInt aFrequency, TTimeIntervalMicroSeconds32 aDuration);
Makes a beep tone with a specified frequency and duration.
This function should not be used. It exists to maintain compatibility with older versions of Symban OS.
|
|
IMPORT_C static TInt IsRomAddress(TBool &aBool, TAny *aPtr);
Tests whether the specified address is in the ROM.
|
|
IMPORT_C static TInt BinarySearch(TInt aCount, const TKey &aKey, TInt &aPos);
Performs a binary search for an array element containing a specified key.
It can be used on any kind of array where elements can be identified by key. It is used by the standard Symbian OS arrays
having CArrayFix
, CArrayVar
or CArrayPak
in their class hierarchy in the implementation of the various functions for inserting, deleting and finding elements by key.
The function can be used by other arrays.
The function returns a zero value if the search is successful and a non-zero value otherwise.
If the search is successful, the function puts the position (i.e. the index) of the element into aPos. If the search is unsuccessful, then the function puts into aPos the position of the first element in the array whose key is greater than the search key.
If the array is empty, i.e. aCount is zero, then the search is unsuccessful and aPos is not defined.
|
|
|
IMPORT_C static TInt QuickSort(TInt aCount, const TKey &aKey, const TSwap &aSwap);
Quick sorts array elements.
It is used by the standard Symbian OS arrays having CArrayFixBase
, CArrayVarBase
or CArrayPakBase
in their class hierarchy in the implementation of their sort functions. The function can be used by other arrays.
The function returns KErrNone if the operation is successful otherwise it returns KErrGeneral.
|
|
|
IMPORT_C static TLanguage Language();
Gets the language of the current locale.
|
IMPORT_C static TUint Collate(TUint aChar);
Converts the character to its collated form.
Collating is the process of removing differences between characters that are deemed unimportant for the purposes of ordering characters. The result of the conversion depends on the locale and on whether this is a UNICODE build or not.
Note that for a non UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.
|
|
Interface status: | deprecated |
IMPORT_C static TUint Fold(TUint aChar);
Folds the specified character.
Folding converts the character to a form which can be used in tolerant comparisons without control over the operations performed. Tolerant comparisons are those which ignore character differences like case and accents.
The result of folding a character depends on the locale and on whether this is a UNICODE build or not.
Note that for a non-UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.
|
|
TChar::Fold()
Converts the character to a form which can be used in tolerant comparisons witho...IMPORT_C static TUint LowerCase(TUint aChar);
Converts the specified character to lower case.
The result of the conversion depends on the locale and on whether this is a UNICODE build or not.
Note that for a non-UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.
|
|
IMPORT_C static TUint UpperCase(TUint aChar);
Converts a specified character to upper case.
The result of the conversion depends on the locale and on whether this is a UNICODE build or not.
Note that for a non UNICODE build, if the binary value of the character aChar is greater than or equal to 0x100, then the character returned is the same as the character passed to the function.
|
|
IMPORT_C static TUint Fold(TUint aChar, TInt aFlags);
Folds the character according to a specified folding method.
TChar::EFoldCase
, convert characters to their lower case form, if any;
TChar::EFoldAccents
, strip accents;
TChar::EFoldDigits
, convert digits representing values 0..9 to characters '0'..'9';
TChar::EFoldSpaces
, convert all spaces (ordinary, fixed-width, ideographic, etc.) to ' ';
TChar::EFoldKana
, convert hiragana to katakana;
TChar::EFoldWidth
, fold full width and half width variants to their standard forms;
TChar::EFoldAll
, use all of the above folding methods.
|
|
TChar::Fold()
Converts the character to a form which can be used in tolerant comparisons witho...IMPORT_C static TUint TitleCase(TUint aChar);
Converts a specified character to its title case version.
|
|
IMPORT_C static TInt StringLength(const TUint8 *aString);
Gets the length of a C style, null terminated, string of single-byte valued characters.
The length does not include the null terminator.
|
|
IMPORT_C static TInt StringLength(const TUint16 *aString);
Gets the length of a C style, null terminated, string of double-byte valued characters.
The length does not include the null terminator.
|
|
IMPORT_C static TInt FreeLogicalDevice(const TDesC &aDeviceName);
Frees the logical device driver DLL associated with a specified driver name.
|
|
IMPORT_C static TInt FreePhysicalDevice(const TDesC &aDriverName);
Frees the physical device driver DLL associated with a specified driver name.
|
|
IMPORT_C static TInt LoadLogicalDevice(const TDesC &aFileName);
Loads the logical device driver (LDD) DLL with the specified filename.
The function searches the system path for the LDD DLL, and loads it. It then makes a kernel server call that:
1. creates the LDD factory object, an instance of a DLogicalDevice
derived class; this involves checking the first UID value to make sure that the DLL is a valid LDD before proceeding to call
the exported function at ordinal 1, which creates the LDD factory object on the kernel heap
2. calls the LDD factory object's Install() function to complete the installation
3. adds the new LDD factory object to the kernel's list of LDD factory objects.
|
|
IMPORT_C static TInt LoadPhysicalDevice(const TDesC &aFileName);
Loads the physical device driver (PDD) DLL with the specified filename.
The function searches the system path for the PDD DLL, and loads it. It then makes a kernel server call that:
1. creates the PDD factory object, an instance of a DPhysicalDevice
derived class; this involves checking the first UID value to make sure that the DLL is a valid PDD before proceeding to call
the exported function at ordinal 1, which creates the PDD factory object on the kernel heap
2. calls the PDD factory object's Install() function to complete the installation
2. adds the new PDD factory object to the kernel's list of PDD factory objects.
|
|
IMPORT_C static TBool QueryVersionSupported(const TVersion &aCurrent, const TVersion &aRequested);
Compares two version objects and returns true if the test version is less than the current version.
Version information is encapsulated by a TVersion
type object and consists of a major version number, a minor version number and a build number.
The function returns true if one of the following conditions is true:
1. the test major version is strictly less than the current major version
2. the test major version is equal to the current major version and the test minor version is less than or equal to the current minor version
If neither condition is true, the function returns false.
|
|
IMPORT_C static TVersion Version();
Retrieves the E32 component version number, which is the kernel architecture version number. For example for EKA2 the major part of the version number will be 2.
|
Capability: | WriteDeviceData |
IMPORT_C static TInt SetMachineConfiguration(const TDesC8 &aConfig);
Sets the machine configuration.
|
|
Capability: | ReadDeviceData |
IMPORT_C static TInt MachineConfiguration(TDes8 &aConfig, TInt &aSize);
Gets the machine configuration.
|
|
IMPORT_C static void SetDebugMask(TUint32 aVal);
Sets the debug mask.
|
IMPORT_C static void SetDebugMask(TUint32 aVal, TUint aIndex);
Sets the debug mask at the given index
|
IMPORT_C static void SetJustInTime(const TBool aBoolean);
Sets just-in-time debugging for this process on or off.
While the function can be called by code running on both the Emulator
and ARM, it only has an effect on the Emulator
. Turning just-in-time debugging off prevents the debug Emulator
closing down when a panic occurs.
By default, just-in-time debugging is on.
Note that the emulator handles panics in the nomal manner, i.e. by killing the thread.
|
RProcess::SetJustInTime(TBool)const
Enables or disables "Just In Time" debugging for this process. This wi...IMPORT_C static void Check();
Checks the validity of the current thread's default heap.
The function walks through the list of allocated cells and the list of free cells checking that the heap is consistent and complete.
|
IMPORT_C static void Invariant();
Panics the current thread with a USER 0 panic.
Typically, this is called when a test for a class invariant fails, i.e. when a test which checks that the internal data of an object is self-consistent, fails.
Such tests are almost always done in debug builds, commonly using the __ASSERT_DEBUG macro.
IMPORT_C static TBool JustInTime();
Tests whether just-in-time debugging is on or off.
The function is used by the Kernel, on the Emulator
, to decide whether to do just-in-time debugging for panics. The function applies to the current process.
Unless overridden by calling User::SetJustInTime(EFalse), just-in-time debugging is on by default.
|
RProcess::JustInTime()const
Tests whether "Just In Time" debugging is enabled or not for this proc...IMPORT_C static void __DbgMarkStart(TBool aKernel);
Marks the start of heap cell checking for the current thread's default heap, or for the kernel heap.
If earlier calls to User::__DbgMarkStart(TBool)
have been made, then this call to User::__DbgMarkStart(TBool)
marks the start of a new nested level of heap cell checking.
Every call to User::__DbgMarkStart(TBool)
should be matched by a later call to User::__DbgMarkEnd(TBool,TInt)
to verify that the number of heap cells allocated, at the current nested level, is as expected. This expected number of heap
cells is passed to User::__DbgMarkEnd(TBool,TInt)
as a parameter; however, the most common expected number is zero, reflecting the fact that the most common requirement is
to check that all memory allocated since a previous call to __DbgStartCheck() has been freed.
|
IMPORT_C static void __DbgMarkCheck(TBool aKernel, TBool aCountAll, TInt aCount, const TUint8 *aFileName, TInt aLineNum);
Checks the current number of allocated heap cells for the current thread's default heap, or the kernel heap.
If aCountAll is true, the function checks that the total number of allocated cells on the heap is the same as aCount. If aCountAll is false, the function checks that the number of allocated cells at the current nested level is the same as aCount.
If checking fails, the function raises a panic. Information about the failure is put into the panic category, which takes the form:
ALLOC COUNT\rExpected aaa\rAllocated bbb\rLn: ccc ddd
Where aaa is the value aCount, bbb is the number of allocated heap cells, ccc is a line number, copied from aLineNum, and ddd is a file name, copied from the descriptor aFileName.
Note that the panic number is 1.
|
IMPORT_C static TUint32 __DbgMarkEnd(TBool aKernel, TInt aCount);
Marks the end of heap cell checking at the current nested level for the current thread's default heap, or the kernel heap.
The function checks that the number of heap cells allocated, at the current nested level, is aCount. The most common value for aCount is zero, reflecting the fact that the most common requirement is to check that all memory allocated since a previous call to __DbgStartCheck() has been freed.
A call to this function should match an earlier call to User::__DbgMarkStart(TBool)
. If there are more calls to this function than calls to User::__DbgMarkStart(TBool)
, then this function raises a USER 51 panic.
If the check fails for a user heap, the function raises an ALLOC: nnnnnnnn panic, where nnnnnnnn is a hexadecimal pointer to the first orphaned heap cell.
If the check fails for the kernel heap, the kernel server raises a KERN-EXEC 17 panic.
|
|
IMPORT_C static void __DbgSetAllocFail(TBool aKernel, RAllocator::TAllocFail aFail, TInt aRate);
Simulates a heap allocation failure for the current thread's default heap, or the kernel heap.
The failure occurs on subsequent calls to new or any of the functions which allocate memory from the heap.
The timing of the allocation failure depends on the type of allocation failure requested, i.e. on the value of aType.
The simulation of heap allocation failure is cancelled if aType is given the value RAllocator::ENone
.
Notes:
1. If the failure type is RAllocator::EFailNext
, the next attempt to allocate from the heap fails; however, no further failures will occur.
2. For failure types RAllocator::EFailNext
and RAllocator::ENone
, set aRate to 1.
|
IMPORT_C static void __DbgSetBurstAllocFail(TBool aKernel, RAllocator::TAllocFail aFail, TUint aRate, TUint aBurst);
Simulates a heap allocation failure for the current thread's default heap, or the kernel heap.
The aBurst failures will occur after subsequent calls to new or any of the functions which allocate memory from the heap.
The timing of the allocation failures will depend on the type of allocation failure requested, i.e. on the value of aType.
The simulation of heap allocation failure is cancelled if aType is given the value RAllocator::ENone
.
|
IMPORT_C static TUint __DbgCheckFailure(TBool aKernel);
Returns the number of heap allocation failures the current debug allocator fail function has caused so far.
This is intended to only be used with fail types RAllocator::EFailNext
, RAllocator::EBurstFailNext
, RAllocator::EDeterministic
and RAllocator::EBurstDeterministic
. The return value is unreliable for all other fail types.
|
|
RAllocator::TAllocFail
A set of heap allocation failure flags.IMPORT_C static TInt ValidateName(const TDesC &aName);
Checks whether a specified name is a valid CObject
name.
A name is deemed to be invalid, if it contains any of the characters: "*", "?", ":" i.e. the characters: asterisk, question mark and single colon.
|
|
IMPORT_C static void IMB_Range(TAny *aStart, TAny *aEnd);
Does the necessary preparations to guarantee correct execution of code in the specified virtual address range.
The function assumes that this code has been loaded or modified by user code. Calling this function against uncommitted memory region is considered as S/W bug and may generate exception on some memory models.
The specified addresses are associated with a user writable code chunk as created by RChunk::CreateLocalCode(TInt,TInt,TOwnerType)
.
The function cleans the data cache to ensure that written data has been committed to main memory and then flushes the instruction cache and branch target buffer (BTB) to ensure that the code is loaded from main memory when it is executed. The Kernel uses the size of the range specified to decide whether to clean/flush line-by-line or to simply clean/flush the entire cache.
|
RChunk::CreateLocalCode(TInt,TInt,TOwnerType)
Creates a user writable chunk that is marked by the kernel as containing code.UserHeap::ChunkHeap(const TDesC *,TInt,TInt,TInt,TInt,TBool)
Creates a heap in a local or global chunk.IMPORT_C static TInt CommandLineLength();
Gets the length of the data which is passed as an argument to the thread function of the current process's main thread when it is first scheduled to run.
|
IMPORT_C static void CommandLine(TDes &aCommand);
Gets a copy of the data which is passed as an argument to the thread function of the current process's main thread when it is first scheduled to run.
|
User::CommandLineLength()
Gets the length of the data which is passed as an argument to the thread functio...IMPORT_C static TExceptionHandler ExceptionHandler();
Gets a pointer to the exception handler for the current thread.
|
IMPORT_C static TInt SetExceptionHandler(TExceptionHandler aHandler, TUint32 aMask);
Sets a new exception handler for the current thread. Note that the handler is not guaranteed to receive floating point exceptions
(KExceptionFpe) when a hardware floating point implementation is in use - see User::SetFloatingPointMode(TFloatingPointMode,TFloatingPointRoundingMode)
for hardware floating point modes and whether they cause user-trappable exceptions.
|
|
KExceptionAbort
...KExceptionKill
...KExceptionUserInterrupt
...KExceptionFpe
...KExceptionFault
...KExceptionInteger
...KExceptionDebug
...IMPORT_C static void ModifyExceptionMask(TUint32 aClearMask, TUint32 aSetMask);
Changes the set of exceptions which the current thread's exception handler can deal with.
aClearMask is the set of flags defining the set of exceptions which the exception handler no longer deals with, while aSetMask is the set of flags defining the new set of exceptions to be set.
Flag clearing is done before flag setting.
|
IMPORT_C static TInt RaiseException(TExcType aType);
Raises an exception of a specified type on the current thread.
If the thread has an exception handler to handle this type of exception, then it is called.
If the thread has no exception handler to handle this type of exception, then the function raises a USER-EXEC 3 panic.
Note that exception handlers are executed in the context of the thread on which the exception is raised; control returns to the point of the exception.
|
|
IMPORT_C static TBool IsExceptionHandled(TExcType aType);
Tests whether the specified exception type can be handled by the current thread.
|
|
IMPORT_C static TCritical Critical();
Gets the critical state associated with the current thread.
|
User::SetCritical(TCritical)
Sets up or changes the effect that termination of the current thread has, either...IMPORT_C static TCritical Critical(RThread aThread);
Gets the critical state associated with the specified thread.
|
|
User::SetCritical(TCritical)
Sets up or changes the effect that termination of the current thread has, either...Capability: | ProtServ | if aCritical==ESystemCritical or ESystemPermanent |
IMPORT_C static TInt SetCritical(TCritical aCritical);
Sets up or changes the effect that termination of the current thread has, either on its owning process, or on the whole system.
The precise effect of thread termination is defined by the following specific values of the TCritical enum:
ENotCritical
EProcessCritical
EProcessPermanent
ESystemCritical
ESystemPermanent
Notes:
The enum value EAllThreadsCritical cannot be set using this function. It is associated with a process, not a thread, and,
if appropriate, should be set using User::SetProcessCritical(TCritical)
.
The states associated with ENotCritical, EProcessCritical, EProcessPermanent, ESystemCritical and ESystemPermanent are all mutually exclusive, i.e. the thread can only be in one of these states at any one time
|
|
User::Critical()
Gets the critical state associated with the current thread.User::ProcessCritical()
Gets the critical state associated with the current process.User::SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...IMPORT_C static TCritical ProcessCritical();
Gets the critical state associated with the current process.
|
User::SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...IMPORT_C static TCritical ProcessCritical(RProcess aProcess);
Gets the critical state associated with the specified process.
|
|
User::SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...Capability: | ProtServ | if aCritical==ESystemCritical or ESystemPermanent |
IMPORT_C static TInt SetProcessCritical(TCritical aCritical);
Sets up or changes the effect that termination of subsequently created threads will have, either on the owning process, or on the whole system.
It is important to note that we are not referring to threads that have already been created, but threads that will be created subsequent to a call to this function.
The precise effect of thread termination is defined by the following specific values of the TCritical enum:
ENotCritical
EAllThreadsCritical
ESystemCritical
ESystemPermanent
Notes:
The enum values EProcessCritical and EProcessPermanent cannot be set using this function. They are states associated with
a thread, not a process, and, if appropriate, should be set using User::SetCritical(TCritical)
.
The states associated with ENotCritical, EAllThreadsCritical, ESystemCritical and ESystemPermanent are all mutually exclusive, i.e. the process can only be in one of these states at any one time.
|
|
User::ProcessCritical()
Gets the critical state associated with the current process.User::SetCritical(TCritical)
Sets up or changes the effect that termination of the current thread has, either...User::Critical()
Gets the critical state associated with the current thread.IMPORT_C static TBool PriorityControl();
Tests whether the current process allows other processes to switch its priority between 'foreground' and 'background'.
|
IMPORT_C static void SetPriorityControl(TBool aEnable);
Allows the current process to choose to have its priority switched by another process between 'foreground' and 'background'.
By default a process does not allow this.
|
IMPORT_C static TSecureId CreatorSecureId();
Return the Secure ID of the process that created the current process.
|
IMPORT_C static TVendorId CreatorVendorId();
Return the Vendor ID of the process that created the current process.
|
static inline TBool CreatorHasCapability(TCapability aCapability, const char *aDiagnostic=0);
Check if the process that created the current process has a given capability
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will return ETrue even though the check failed.
|
|
static inline TBool CreatorHasCapability(TCapability aCapability1, TCapability aCapability2, const char *aDiagnostic=0);
Check if the process that created the current process has both of the given capabilities
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will return ETrue even though the check failed.
|
|
IMPORT_C static TInt ParameterLength(TInt aSlot);
Gets the length of the specified item of environment data belonging to the current process.
Environment data may be stored in the process and is passed to a child process on creation of that child process.
|
|
|
IMPORT_C static TInt GetTIntParameter(TInt aSlot, TInt &aData);
Gets the specified environment data item belonging to the current process; this is assumed to be a 32 bit value.
Environment data may be stored in the process and is passed to a child process on creation of that child process.
On successful return from this function, the data item is deleted from the process.
|
|
|
IMPORT_C static TInt GetDesParameter(TInt aSlot, TDes8 &aDes);
Gets the specified environment data item belonging to the current process; this is assumed to be an 8-bit descriptor.
Environment data may be stored in the process and is passed to a child process on creation of that child process.
On successful return from this function, the data item is deleted from the process.
|
|
|
IMPORT_C static TInt GetDesParameter(TInt aSlot, TDes16 &aDes);
Gets the specified environment data item belonging to the current process; this is assumed to be an 16-bit descriptor.
Environment data may be stored in the process and is passed to a child process on creation of that child process.
On successful return from this function, the data item is deleted from the process.
|
|
|
IMPORT_C static TInt RenameThread(const TDesC &aName);
Assigns a new name to the current thread, replacing any existing name that may have been set.
The new name must be a valid name and it must also be such that the thread's new fullname remains unique amongst threads. The length of the new name must be less than or equal to 80 (maximum length of kernel objects) otherwise a panic is raised.
|
|
IMPORT_C static TInt RenameProcess(const TDesC &aName);
Assigns a new name to the current process, replacing any existing name.
When a process is created, its default name is the name portion of the filename from which the executable is loaded.
The new name must be a valid name and it must also be such that the process's new fullname remains unique amongst processes.
|
|
TCritical
A set of values that defines the effect that terminating a thread has, either on its owning process or on the whole system.
A thread is said to be critical if its owning process or the entire system terminates when the thread itself terminates.
You pass one of these values to the functions:
The meaning of a value when passed to one function is different to its meaning when passed the other function. See the description of each individual value.
User::SetCritical(TCritical)
Sets up or changes the effect that termination of the current thread has, either...User::SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...
|
TRealtimeState
A threads realtime state. Some non-realtime behaviour can be detected by the kernel. When it does so, action is taken depending on the thread state:
ERealtimeStateOff - no action.
ERealtimeStateOn - the the thread will be panicked with KERN-EXEC 61 (EIllegalFunctionForRealtimeThread).
ERealtimeStateWarn - no action. However, if the kernel trace flag KREALTIME is enabled then tracing will be emitted as if the thread state was ERealtimeStateOn.
|