memana/analyzetoolclient/dynamicmemoryhook/inc/threadstack.h
changeset 2 6a82cd05fb1e
parent 1 3ff3fecb12fe
equal deleted inserted replaced
1:3ff3fecb12fe 2:6a82cd05fb1e
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Declaration of the class TThreadStack.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef THREADSTACK_H
       
    20 #define THREADSTACK_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <u32std.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 *  Stores thread id and the start of the thread's callstack
       
    29 */
       
    30 class TThreadStack
       
    31     {
       
    32     public:
       
    33     
       
    34         /**
       
    35         * C++ default constructor.
       
    36         * @param aId The thread id
       
    37         * @param aStackStart The start of thread's stack
       
    38         */
       
    39         TThreadStack( TThreadId aId, TUint32 aStackStart );
       
    40         
       
    41         /**
       
    42         * Checks if this is the current thread and if this is the current
       
    43         * thread assings value to the given parameter
       
    44         * @param aStackStart& A reference to stack start
       
    45         * @return TBool The start of thread's stack
       
    46         */
       
    47         TBool ThreadStackStart( TUint32& aStackStart );
       
    48        
       
    49         /**
       
    50         * Checks if this the the current thread
       
    51         * @param aThreadId A thread id
       
    52         * @return TBool ETrue it this is the current thread, EFalse otherwise
       
    53         */ 
       
    54         TBool Match( const TUint aThreadId = 0 );
       
    55         
       
    56     private: // Member variables
       
    57     
       
    58         /* The id of the thread */
       
    59         TThreadId iId;
       
    60         
       
    61         /* The start addess of this thread */
       
    62         TUint32 iStackStart;
       
    63     };
       
    64 
       
    65 
       
    66 #endif // THREADSTACK_H
       
    67 
       
    68 // End of File
       
    69 
       
    70