dskt2.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2010, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00048 #ifndef DSKT2_
00049 #define DSKT2_
00050 
00051 #ifdef __cplusplus
00052 extern "C" {
00053 #endif
00054 
00057 
00058 #include <xdc/std.h>
00059 #include <xdc/runtime/IHeap.h>
00060 
00061 #include <ti/xdais/ialg.h>
00062 #include <ti/xdais/ires.h>
00063 #include <stddef.h>
00064 
00065 #define DSKT2_NUM_SCRATCH_GROUPS 20     
00069 #define DSKT2_MAX_MEM_ALLOCATION_SIZE  0xFFFF   
00073 /* NOTE: DO NOT Change NUM_SHAREDHEAPS*/
00074 #define DSKT2_NUM_SHAREDHEAPS 2
00075 
00084 #define DSKT2_MODNAME  "ti.sdo.fc.dskt2"
00085 
00093 typedef Void (*DSKT2_CacheWBInvFxn)(Ptr blockPtr, size_t byteCnt, Bool wait);
00094 
00159 extern Void DSKT2_activateAlg(Int scratchMutexId, IALG_Handle alg);
00160 
00161 
00194 extern Int DSKT2_controlAlg(IALG_Handle alg, IALG_Cmd cmd,
00195     IALG_Status *status);
00196 
00197 
00276 extern IALG_Handle DSKT2_createAlg(Int scratchMutexId, IALG_Fxns * fxns,
00277     IALG_Handle parent, IALG_Params * params);
00278 
00279 
00373 extern IALG_Handle DSKT2_createAlg2(Int scratchMutexId, IALG_Fxns * fxns,
00374         IALG_Handle parent, IALG_Params * params,
00375         xdc_runtime_IHeap_Handle extHeapId);
00376 
00377 
00453 IALG_Handle DSKT2_createAlgExt(Int scratchId, IALG_Fxns * fxns,
00454         IALG_Handle parent, IALG_Params * params);
00455 
00508 extern Void DSKT2_deactivateAlg(Int scratchMutexId, IALG_Handle alg);
00509 
00521 extern Int DSKT2_deactivateAll();
00522 
00557 extern Bool DSKT2_freeAlg(Int scratchMutexId, IALG_Handle alg);
00558 
00588 extern Bool DSKT2_allocScratch(IALG_Handle alg,Int mutexId, IALG_MemRec *memTab,
00589         Int numRecs);
00613 extern Void DSKT2_freeScratch(Int mutexId, Void *addr, UInt size);
00614 
00627 extern Bool DSKT2_allocPersistent(IALG_MemRec *memTab, Int numRecs);
00628 
00641 extern Void DSKT2_freePersistent(IALG_MemRec *memTab, Int numRecs);
00642 
00643 /*
00644  * Functions below are friend functions that are used by RMAN and some IRES
00645  * implementations to cooperatively yield to higher priority algorithms.
00646  */
00654 Void DSKT2_yield(IRES_YieldResourceType resource,
00655         IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00656 
00661 IRES_YieldArgs DSKT2_getYieldArgs(Int scratchId);
00662 
00667 IRES_YieldArgs DSKT2_setYieldArgs(Int scratchId, Bool yieldFlag);
00668 
00672 
00673 #ifdef __cplusplus
00674 }
00675 #endif /* extern "C" */
00676 
00677 #endif  /* DSKT2_ */
00678 
00679 /*
00680  *  @(#) ti.sdo.fc.dskt2; 1, 0, 4,381; 11-2-2010 18:25:22; /db/atree/library/trees/fc/fc-n22x/src/ xlibrary
00681 
00682  */
00683 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated