connectivitylayer/isce/isirouter_dll/inc/isithreadcontainer.h
changeset 0 63b37f68c1ce
child 9 8486d82aef45
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __ISITHREADCONTAINER_H__
       
    19 #define __ISITHREADCONTAINER_H__
       
    20 
       
    21 #include "misichannelrouterif.h"  // For MISIChannelRouterIf
       
    22 
       
    23 const TUint8 KAmountOfKernelThreads( 5 );
       
    24 const TUint8 KAmountOfUserThreads( 5 );
       
    25 
       
    26 NONSHARABLE_CLASS( DISIThreadContainer ) : public DBase
       
    27     {
       
    28 
       
    29     public:
       
    30     
       
    31         DISIThreadContainer();
       
    32         ~DISIThreadContainer();
       
    33             
       
    34         TDfcQue* AllocateThread( const MISIChannelRouterIf::TISIDfcQThreadType aType );
       
    35         void DeallocateThread( TDfcQue* );
       
    36         
       
    37         TDfcQue* ReserveKernelThread();
       
    38         TDfcQue* ReserveUserThread();
       
    39         
       
    40     private:
       
    41         
       
    42         // Owned
       
    43         TDfcQue* iKClientDfcQueList[ KAmountOfKernelThreads ];
       
    44         TDfcQue* iUClientDfcQueList[ KAmountOfUserThreads ];
       
    45         TUint8   iKThreadOccupation[ KAmountOfKernelThreads ];
       
    46         TUint8   iUThreadOccupation[ KAmountOfUserThreads ];
       
    47         HBuf8*   iNameTable[ KAmountOfKernelThreads + KAmountOfUserThreads ];
       
    48     };
       
    49 
       
    50 #endif /* __DISITHREADCONTAINER_H__ */