DSMCC  15.3.1
source/dsfm/inc/sbm.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00026 #ifndef _DSBM_H_
00027 #define _DSBM_H_
00028 
00029 #include "techtype.h"
00030 #include "stdfuncs.h"
00031 
00032 /*------------------- Functions supplied to SBM at setup ---------------------*/
00033 
00034 
00035 /*---------------- Setup structure for SBM initialisation -------------------*/
00036 
00037 typedef struct
00038 {
00039    // Manditory functions - used in creation, destruction of instance
00040 
00041    F_MemAlloc        memAlloc;
00042    F_MemFree         memFree;
00043 
00044    F_Locking         lock;
00045    F_Locking         unlock;
00046 
00047    // mutex or binary semaphore
00048    void*             mtx_sem;
00049 
00050    // Size of memory in 64K byte blocks to be managed by SBM.
00051    // Minimum value: 0
00052    // Suggested value: 16
00053    U16BIT            bufferSize;
00054 
00055 } S_SbmSetup;
00056 
00057 // SBM instance handle definition
00058 typedef struct s_SbmInstance*       H_SbmInstance;
00059 
00060 
00061 /*---------------------- Functions that configure SBM ------------------------*/
00062 
00068 H_SbmInstance SBM_CreateInstance( S_SbmSetup *pSetup );
00069 
00077 void SBM_DestroyInstance( H_SbmInstance sbm, void **pBufMtx );
00078 
00079 /*--------------- Allocate / release section buffer functions ----------------*/
00080 
00089 U8BIT* SBM_AllocateBuffer( H_SbmInstance sbm, U8BIT size1 );
00090 
00091 
00098 void SBM_ReleaseBuffer( H_SbmInstance sbm, U8BIT* buffer );
00099 
00100 #endif /*_DSBM_H_*/
 All Data Structures Files Functions Typedefs