kernel/eka/include/e32shbuf_priv.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32/include/e32shbuf_priv.h
       
    15 // Shareable Data Buffers
       
    16 
       
    17 /**
       
    18 	@file
       
    19 	@internalComponent
       
    20 	@prototype
       
    21 */
       
    22 
       
    23 #ifndef E32SHBUF_PRIV_H
       
    24 #define E32SHBUF_PRIV_H
       
    25 
       
    26 
       
    27 #include <e32def.h>
       
    28 
       
    29 
       
    30 /**
       
    31 	Defines flags for TShPoolInfo.
       
    32 
       
    33 	These values specify the behaviour of the pool and its buffers.
       
    34 
       
    35 	@internalComponent
       
    36 	@prototype
       
    37 */
       
    38 enum TShPoolCreateFlags
       
    39 	{
       
    40 	/**
       
    41 	The buffers in this pool are at least the size of an MMU page,
       
    42 	are aligned to an MMU page, and may be mapped in and out of a process's
       
    43 	address space independently.
       
    44 	*/
       
    45 	EShPoolPageAlignedBuffer	= 0x0001,
       
    46 
       
    47 	/**
       
    48 	The buffers in this pool do not have any size or alignment restrictions beyond
       
    49 	that specified by the pool creator.
       
    50 
       
    51 	The whole pool is always mapped into a process's address space.
       
    52 	*/
       
    53 	EShPoolNonPageAlignedBuffer = 0x0002,
       
    54 
       
    55 	/**
       
    56 	This pool maps onto device memory, not system RAM.
       
    57 	*/
       
    58 	EShPoolPhysicalMemoryPool	= 0x0004,
       
    59 
       
    60 	/**
       
    61 	The physical memory backing this pool is contiguous.
       
    62 	*/
       
    63 	EShPoolContiguous			= 0x0008,
       
    64 
       
    65 	/**
       
    66 	Each buffer will only ever be mapped into one process's address space at a time.
       
    67 
       
    68 	Requires EShPoolPageAlignedBuffer.
       
    69 	*/
       
    70 	EShPoolExclusiveAccess		= 0x0010,
       
    71 
       
    72 	/**
       
    73 	An unmapped page will be placed between each buffer.
       
    74 
       
    75 	Requires EShPoolPageAlignedBuffer.
       
    76 	*/
       
    77 	EShPoolGuardPages			= 0x0020,
       
    78 
       
    79 	/**
       
    80 	Set by automatic shrinking when it is unable to shrink the pool despite there
       
    81 	being enough free buffers available (usually due to fragmentation).  This prevents
       
    82 	the automatic shrinking code being continually called when it can't do anything.
       
    83 	*/
       
    84 	EShPoolSuppressShrink		= 0x80000000,
       
    85 	};
       
    86 
       
    87 
       
    88 /**
       
    89 	Specifies client flags.
       
    90 
       
    91 	@internalComponent
       
    92 	@prototype
       
    93 */
       
    94 enum TShPoolClientFlags
       
    95 	{
       
    96 	/**
       
    97 	Buffers will be automatically mapped into this process's address space when a handle is
       
    98 	created for them.  Having this flag clear can be useful for a process that will function
       
    99 	as an intermediary, without requiring access to the data in the buffers.
       
   100 	*/
       
   101 	EShPoolAutoMapBuf		= 0x1000,
       
   102 
       
   103 	/**
       
   104 	Newly-allocated buffers will not be mapped into this process's address space.
       
   105 	*/
       
   106 	EShPoolNoMapBuf			= 0x2000,
       
   107 	};
       
   108 
       
   109 
       
   110 /**
       
   111 	Specifies the type of notification.  (A real enumeration, not bit flags.)
       
   112 
       
   113 	@internalComponent
       
   114 	@prototype
       
   115 */
       
   116 enum TShPoolNotifyType
       
   117 	{
       
   118 	EShPoolLowSpace = 1,		// notifies when free buffers drop to a certain number
       
   119 	EShPoolFreeSpace = 2,		// notifies when free buffers rise to a certain number
       
   120 	};
       
   121 
       
   122 /**
       
   123 	Structure for passing base address and pointer of buffer
       
   124 
       
   125 	@internalComponent
       
   126 	@prototype
       
   127 */
       
   128 struct SShBufBaseAndSize
       
   129 	{
       
   130 	TLinAddr iBase;
       
   131 	TUint    iSize;
       
   132 	};
       
   133 
       
   134 
       
   135 #endif	// E32SHBUF_PRIV_H