📄 ssi.x
字号:
EXTERN S16 SRegTmr ARGS((Ent ent,Inst inst,S16 period,PFS16 tmrFnct));
EXTERN S16 SDeregTmr ARGS((Ent ent,Inst inst,S16 period,PFS16 tmrFnct));
EXTERN S16 SRegActvTsk ARGS((Ent ent,Inst inst,Ttype ttype,Prior prior,
ActvTsk actvTsk));
EXTERN S16 SPstTsk ARGS((Pst *pst, Buffer *mBuf));
#ifdef ENB_RELAY
EXTERN S16 SRegDrvrTsk ARGS((Inst inst, ProcId low, ProcId high,
ActvTsk actvTsk, ISTsk isTsk));
#endif /* ENB_RELAY */
#ifdef SS_RTR_SUPPORT
EXTERN S16 SRegRtrTsk ARGS((Route *, Cntr, ActvTsk));
EXTERN S16 SDeregRtrTsk ARGS((Route *, Cntr));
#endif /* SS_RTR_SUPPORT */
EXTERN INLINE S16 SAddDBufPst ARGS((Buffer *mBuf, Buffer *dBuf));
EXTERN INLINE S16 SAddDBufPre ARGS((Buffer *mBuf, Buffer *dBuf));
EXTERN INLINE S16 SRemDBufPst ARGS((Buffer *mBuf, Buffer **dBuf));
EXTERN INLINE S16 SRemDBufPre ARGS((Buffer *mBuf, Buffer **dBuf));
EXTERN INLINE S16 SGetDataRx ARGS((Buffer *dBuf, MsgLen pad, Data **dat, MsgLen *mLen));
EXTERN INLINE S16 SGetDataTx ARGS((Buffer *dBuf, Data **dat, MsgLen *mLen));
EXTERN INLINE S16 SUpdMsg ARGS((Buffer *mBuf, Buffer *dBuf, MsgLen mLen));
EXTERN S16 SAlignDBufEven ARGS((Buffer *dBuf));
EXTERN INLINE S16 SInitNxtDBuf ARGS((Buffer *mBuf));
EXTERN INLINE S16 SGetNxtDBuf ARGS((Buffer *mBuf, Buffer **dBuf));
EXTERN INLINE S16 SChkNxtDBuf ARGS((Buffer *mBuf));
EXTERN INLINE S16 SSetIntPend ARGS((U16 id, Bool flag));
EXTERN S16 SChkMsg ARGS((Buffer *mBuf));
EXTERN S16 SDeregInitTskTmr ARGS((Ent ent,Inst inst));
EXTERN S16 SExitTsk ARGS((void ));
EXTERN S16 SExitInt ARGS((void ));
EXTERN S16 SHoldInt ARGS((void ));
EXTERN S16 SRelInt ARGS((void ));
EXTERN INLINE S16 SEnbInt ARGS((void ));
EXTERN INLINE S16 SDisInt ARGS((void ));
EXTERN S16 SGetVect ARGS((VectNmb vectNmb,PIF *vectFnct));
EXTERN S16 SPutVect ARGS((VectNmb vectNmb,PIF vectFnct));
#ifdef WINNT_KERN
EXTERN S16 SPutIsrDpr ARGS((VectNmb vectNmb, Void *context, PIF isrFnct,
PIF dprFnct));
EXTERN S16 SSyncInt ARGS((U16 adapterNmb, PFVOID syncFnct,
Void *syncContext));
#endif
EXTERN S16 SInitSema ARGS((Region region, Sema *sema));
EXTERN S16 SRelSema ARGS((Region region, Sema sema));
EXTERN S16 SGetSema ARGS((Region region, Sema sema));
EXTERN S16 SActvInit ARGS((Ent ent,Inst inst,Region region,Reason reason));
EXTERN S16 SActvTsk ARGS((Prior prior,Route route,Ent srcEnt,
Inst srcInst,Buffer *mBuf));
EXTERN S16 SActvTmr ARGS((void ));
EXTERN S16 SGetOpt ARGS((int argc,char **argv,char *opts));
EXTERN S16 SGetEntInst ARGS((Ent *ent, Inst *inst));
EXTERN S16 SSetEntInst ARGS((Ent ent, Inst inst));
EXTERN ProcId SFndProcId ARGS((void));
EXTERN Void SSetProcId ARGS((ProcId pId));
EXTERN S16 SGetDBufSiz ARGS((Region region, Pool pool, S16 *size));
EXTERN S16 SGetStrtIdx ARGS((Region region, Pool pool, S16 *idx));
EXTERN S16 SGetEndIdx ARGS((Region region, Pool pool, S16 *idx));
EXTERN S16 SGetStrtPad ARGS((Region region, Pool pool, S16 *pad));
#ifdef MT
/*
* These routines are only available for multi-threaded
* system service implementations
*/
EXTERN S16 SGetMutex ARGS((MtMtxId *mId));
EXTERN S16 SPutMutex ARGS((MtMtxId mId));
EXTERN S16 SLockMutex ARGS((MtMtxId mId));
EXTERN S16 SUnlockMutex ARGS((MtMtxId mId));
EXTERN S16 SGetCond ARGS((MtCondId *cId));
EXTERN S16 SPutCond ARGS((MtCondId cId));
EXTERN S16 SCondWait ARGS((MtMtxId mId,MtCondId cId));
EXTERN S16 SCondSignal ARGS((MtCondId cId));
EXTERN S16 SCondBroadcast ARGS((MtCondId cId));
EXTERN S16 SGetThread ARGS((MtThrd thrd, MtThrdFlags thr_flgs,
Ptr arg, MtThrdId *thrdId));
EXTERN S16 SPutThread ARGS((MtThrdId thrdId));
EXTERN Void SThreadYield ARGS((void));
EXTERN Void SThreadExit ARGS((Ptr *status));
EXTERN Void SSetThrdPrior ARGS((MtThrdId tId, MtThrdPrior tPr));
EXTERN Void SGetThrdPrior ARGS((MtThrdId tId, MtThrdPrior *tPr));
EXTERN Void SExit ARGS((void));
#endif /* MT */
#ifdef SS
EXTERN S16 SRegTTsk ARGS((Ent ent, Inst inst, Ttype type, Prior prior,
PAIFS16 initTsk, ActvTsk actvTsk));
EXTERN S16 SDeregTTsk ARGS((Ent ent, Inst inst));
EXTERN S16 SCreateSTsk ARGS((SSTskPrior tskPrior, SSTskId *tskId));
EXTERN S16 SDestroySTsk ARGS((SSTskId tskId));
EXTERN S16 SAttachTTsk ARGS((Ent ent, Inst inst, SSTskId tskId));
EXTERN S16 SDetachTTsk ARGS((Ent ent, Inst inst));
EXTERN S16 SRegRegion ARGS((Region region, SRegInfo *regInfo));
EXTERN S16 SDeregRegion ARGS((Region region));
EXTERN S16 SAlloc ARGS((Region region, Size *size, U32 flags, Data **ptr));
EXTERN S16 SFree ARGS((Region region, Data *ptr, Size size));
#ifndef SS_ENABLE_MACROS
EXTERN S16 SGetBufRegionPool ARGS((Buffer *mBuf, Region *region, Pool *pool));
#endif /* SS_ENABLE_MACROS */
#ifdef SS_OLD_THREAD
EXTERN S16 SGetMutex ARGS((SMtxId *mId));
EXTERN S16 SPutMutex ARGS((SMtxId mId));
EXTERN S16 SLockMutex ARGS((SMtxId mId));
EXTERN S16 SUnlockMutex ARGS((SMtxId mId));
EXTERN S16 SGetCond ARGS((SCondId *cId));
EXTERN S16 SPutCond ARGS((SCondId cId));
EXTERN S16 SCondWait ARGS((SMtxId mId,SCondId cId));
EXTERN S16 SCondSignal ARGS((SCondId cId));
EXTERN S16 SCondBroadcast ARGS((SCondId cId));
EXTERN S16 SGetThread ARGS((SThrd thrd, S32 thr_flgs,
Ptr arg, SThrdId *thrdId));
EXTERN S16 SPutThread ARGS((SThrdId thrdId));
EXTERN Void SThreadYield ARGS((void));
EXTERN Void SThreadExit ARGS((Ptr status));
EXTERN Void SSetThrdPrior ARGS((SThrdId tId, S32 tPr));
EXTERN Void SGetThrdPrior ARGS((SThrdId tId, S32 *tPr));
EXTERN Void SExit ARGS((void));
#endif
EXTERN S16 SInitLock ARGS((SLockId *lock,U8 type));
EXTERN S16 SLock ARGS((SLockId *lock));
EXTERN S16 SUnlock ARGS((SLockId *lock));
EXTERN S16 SDestroyLock ARGS((SLockId *lock));
/*** add by shang, 2002-1-10 ***/
EXTERN S16 SInitRegion ARGS((void));
EXTERN S16 SRegRegId ARGS((Ent ent, Inst inst, Region regId));
EXTERN S16 SDeregRegId ARGS((Region region));
EXTERN S16 SCreateRegion ARGS((Ent ent, Inst inst, Region regId, RegionCfg_s * cfg, U16 numBlock));
EXTERN S16 SDelRegion ARGS((Region regId));
EXTERN S16 SRegShow ARGS((Region region, Pool pool));
/*** add by shang is over ***/
#endif /* SS */
/* function prototypes */
/* stack manager initialization function */
EXTERN S16 smActvInit ARGS((Ent ent, Inst inst, Region region, Reason reason));
/* stack manager external initialization function */
EXTERN S16 smInitExt ARGS((void));
/* stack manager activation function */
EXTERN S16 smActvTsk ARGS((Pst *pst, Buffer *mBuf));
/* Macros... */
#define SS_INITDCHN(chn) (chn)->next = NULLP; (chn)->prev = NULLP
#define SS_INITQUE(qu) \
SS_INITDCHN(&(qu)->dChn); (qu)->crntSize = 0
#define SS_QLEN(bq) ((bq)->crntSize)
#define SS_MLEN(mb) ((mb)->t.msg.msgLen)
#ifdef __cplusplus
}
#endif
#endif /* __SSIX__ */
/********************************************************************30**
End of file: ssi.x 2.31 - 10/14/98 14:38:22
*********************************************************************31*/
/********************************************************************40**
Notes:
*********************************************************************41*/
/********************************************************************50**
*********************************************************************51*/
/********************************************************************60**
Revision history:
*********************************************************************61*/
/********************************************************************80**
version pat init description
----------- ----- ---- ------------------------------------------------
2.1 --- nkk 1. initial release
2.2 --- jrl 1. move some typedefs from ssi.x to support
reordering of ssi and gen includes
--- nkk 2. add Chn definition in VX section.
2.3 --- fmg 1. add SRegDrvr prototype
2.4 --- jrl 1. add ifdef SSINT2
2.5 --- fmg 1. add spare elements for alignment to processor
boundaries
2.6 --- jrl 1. add Buffer and Queue typedef for portable
2.7 --- mc 1. add forward definitions - buffer and queue for
pSOS and VRTXsa cases.
2.8 --- fmg 1. changed struct buffer to struct ss_buffer,
struct queue to struct ss_queue, struct dat
to struct ss_dat, and struct msg to struct ss_msg
to avoid conflicts with system include for other
--- mc 2. add ss_queue and ss_buffer typedefs for VxWorks
2.9 --- fmg 1. compressed SS structures to remove unused fields
Aligned on 4byte boundaries and ordered Pst.
--- fmg 2. Changed extern to EXTERN
--- fmg 3 Added INLINE to some function definitions
--- fmg 4. Added Pk/Unpk macros.
--- fmg 5. Changed Ticks from S32 to U32
2.10 --- fmg 1. removed Pk macros for simplicity.
2.11 --- fmg 1. added new system service primitive prototypes
for functions that provide needed functionality
to drivers.
--- fmg 2. modified MSVER2 msg structure to track next
data buffer in a message
2.12 --- fmg 1. converted vxWorks buffer structure from large
byte arrays to chains (ala MSVER2).
2.13 --- fmg 2. added SSetProcId for VW case
2.14 --- fmg 1. modified SGetDatRx
--- fmg 2. added SSetIntProc, SChkMsg
--- fmg 3. Converted MSVER2 to use pointers
--- fmg 4. Added INLINE declaration for compilers that
can use it.
2.15 --- vk 1. Added WINNT changes
2.16 --- mb 1. Made structures ss_dat and ss_msg similar
for VxWorks and MOS.
--- mb 2. Moved MACROS MS_INIDCHN, MS_INITQUE, MS_QLEN,
MS_MLEN from ms.x. Replaced the prefix "MS_"
by "SS_"
--- mb 3. New typedefs ErrCls, ErrCode and ErrVal
--- mb 4. Prototype for SLogError, SDeregTmr,
SGetDBufSize, SGetStrtIdx, SGetEndIdx,
SGetStrtPad.
2.17 --- kish 1. Fixed a compiler warning
2.18 --- fmg 1. text changes
--- fmg 2. re-introduce PORTVER
2.19 --- kr 1. added two new routines "SPutIsrDpr" and
"SSyncInt" for system services on WINNT.
2.20 --- mb 1. moved struct def uProc from ms.x
mb 2. moved Buffer and Queue def from gen.x
mb 3. Removed SSINT stuff.
2.21 --- mb 1. Removed #ifdef VW for SSetProcId Prototype
2.22 --- mb 1. Changed BufQLen data type
2. Removed spare fields after QLen/BufQLen fields
in Queue and BufQ structure.
*********************************************************************81*/
/********************************************************************90**
ver pat init description
------------ -------- ---- ----------------------------------------------
2.23 --- kvm 1. Moved out typedefs DateTime, Duration, Mem,
and MemoryId to gen.x
--- kvm 2. moved out forward definition of Buffer to
ssi.x
2.24 --- kvm 1. renamed CMATM2 as CMFILE_REORG_1
2.25 --- kr 1. changed MsgLen typedef to S32
2.26 --- bbk 1. Changed copyright header date.
2.27 --- ag 1. Relocated #ifdef WINNT section and
excluded this section for NTSS
--- ag 2. Added declaration for basic SS types
under #ifdef SS section
--- ag 3. Added new definition for ISTsk under
RYINT1 flag
2.28 --- kr 1. Corrected the order of #ifndef NS
and #ifdef WINNT
2.29 --- kr 1. Added define SS_ENABLE_MACROS
--- kr 2. Moved SGETBUFREGION and SGETBUFPOOL to ssi.h
--- kr 3. Added nsRegDevice and nsDeregDevice
prototypes
--- bsr 1. Chaged WINNT to WINNT_IATM
--- bsr 2. Added NsDevCtl and device control function
prototypes.
2.30 --- kp 1. Added extern "C" for making this file C++
compilable
--- kr 2. Removed Windows NT specific prototypes
2.31 --- kp 1. Added in prototype for SRegRtrTsk()
2. Added in extern declarations of msArg* for
SGetOpt() functionality
*********************************************************************91*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -