📄 pip.h62
字号:
.endm
;
;# ======== PIP_config ========
;
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", PIP_config$regs
PIP_config .macro _gNumEmbed, _gNextId
.endm
;
;# ======== PIP_end ========
;
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", PIP_end$regs
PIP_end .macro
.endm
;
;# ======== PIP_init ========
;
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;# Dependencies:
;# none
;#
;
.asg "", PIP_init$regs
PIP_init .macro
.endm
;
;# ======== PIP_alloc ========
;
;# Preconditions:
;# a4 = address of the pipe object
;# pipe.writerNumFrames > 0
;#
;# Postconditions:
;# none
;#
;# Constraints and Calling Environment:
;# Before calling PIP_alloc, a function should check the writerNumFrames
;# member of the PIP_Obj structure to make sure it is greater than 0
;# (i.e., that at least one empty frame is available).
;#
;# Note:
;# Registers used by 'notifyWriter' functions might be modified too.
;#
;
.asg "a1,a4,a5,b3,:PIP_F_take$regs:", PIP_alloc$regs
PIP_alloc .macro dummy
CHK_void PIP_alloc, dummy
mvkl PIP_F_take,b3
mvkh PIP_F_take,b3
b b3 ; start branch to frame take function
; form offset of writerNumFrames in PIP_Obj
mvk (PIP_O_TLBASE + PIP_O_NUMFRAMES),a1
addu a4,a1,a5:a4 ; form address of writerNumFrames
mvkl pipa?,b3 ; set temp return pointer to here
mvkh pipa?,b3
nop
pipa?:
.endm
;
;# ======== PIP_put ========
;
;# Preconditions:
;# a4 = address of the pipe object
;#
;# Postconditions:
;# none
;#
;# Note:
;# Registers used by 'notifyReader' functions might be modified too.
;#
;
.asg "a0,a1,a4,a5,b3,b4,:PIP_F_give$regs:", PIP_put$regs
PIP_put .macro dummy
CHK_void PIP_put, dummy
mvkl PIP_F_give, b3
mvkh PIP_F_give, b3
; form offset of writerSize in PIP_Obj
mvk (PIP_O_TLBASE + PIP_O_FSIZE),a1
addu a4,a1,a1:a0 ; form address of writerSize in a0
ldw *a0,b4 ; load writerSize into b4
b b3 ; start branch to frame give function
; form offset of writerCurdesc in PIP_Obj
mvk (PIP_O_TLBASE + PIP_O_CURDESC),a1
addu a4,a1,a5:a4 ; form address of writerCurdesc in a4
mvkl pipp?,b3 ; set temp return pointer to here
mvkh pipp?,b3
nop
pipp?:
.endm
;
;# ======== PIP_get ========
;
;# Preconditions:
;# a4 = address of the pipe object
;# pipe.readerNumFrames > 0
;#
;# Postconditions:
;# none
;#
;# Constraints and Calling Environment:
;# Before calling PIP_get, a function should check the readerNumFrames
;# member of the PIP_Obj structure to make sure it is greater than 0
;# (i.e., at least one full frame is available).
;#
;# Note:
;# Registers used by 'notifyReader' functions might be modified too.
;#
;
.asg "a1,a4,a5,b3,:PIP_F_take$regs:", PIP_get$regs
PIP_get .macro dummy
CHK_void PIP_get, dummy
mvkl PIP_F_take, b3
mvkh PIP_F_take, b3
b b3 ; start branch to frame take function
; form offset of readerNumFrames in PIP_Obj
mvk (PIP_O_HDBASE + PIP_O_NUMFRAMES),a1
addu a4,a1,a5:a4 ; form address of readerNumFrames
mvkl pipg?,b3 ; set temp return pointer to here
mvkh pipg?,b3
nop
pipg?:
.endm
;
;# ======== PIP_free ========
;
;# Preconditions:
;# a4 = address of the pipe object
;#
;# Postconditions:
;# none
;#
;# Note:
;# Registers used by 'notifyWriter' functions might be modified too.
;#
;
.asg "a1,a4,a5,b3,b4,:PIP_F_give$regs:", PIP_free$regs
PIP_free .macro dummy
CHK_void PIP_free, dummy
mvkl PIP_F_give,b3
mvkh PIP_F_give,b3
ldw *a4,b4 ; fetch framesize from 'threshold' in PIP_Obj
b b3 ; start branch to frame give function
; form offset of readerCurdesc in PIP_Obj
mvk (PIP_O_HDBASE + PIP_O_CURDESC),a1
addu a4,a1,a5:a4 ; form address of readerCurdesc in a4
mvkl pipf?,b3 ; set temp return pointer to here
mvkh pipf?,b3
nop
pipf?:
.endm
;
;# ======== PIP_startup ========
;
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;# Dependencies:
;# Must come before HWI_startup to allow pipes to be ready before ISRs are
;# taken and I/O starts.
;#
;
.asg "a4,b3,b4,:PIP_F_start$regs:", PIP_startup$regs
PIP_startup .macro dummy
CHK_void PIP_startup, dummy
; expand startup code only if some PIP objects are configured
.if((PIP$ + PIP_gNumEmbed) !=0 )
mvkl PIP_F_start,b4 ; set up for far branch
mvkh PIP_F_start,b4
b b4 ; start branch to startup function
mvkl PIP_D_tabbeg,a4 ; set a4 for PIP_F_start call
mvkh PIP_D_tabbeg,a4
nop
mvkl pips?,b3 ; set return for here
mvkh pips?,b3
.endif
pips?:
.endm
;
;# ======== PIP_readprobeSET ========
; Attach named probe to the named pipe's reader
;
; Currently not implemented for the C6x.
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", PIP_readprobeSET$regs
PIP_readprobeSET .macro dummy
.wmsg "PIP_readprobeSET not implemented for C6x."
.endm
;
;# ======== PIP_readprobeCLR ========
; Disable probing on a pipe's reader
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", PIP_readprobeCLR$regs
PIP_readprobeCLR .macro dummy
.wmsg "PIP_readprobeCLR not implemented for C6x."
.endm
;
;# ======== PIP_writeprobeSET ========
; Attach named probe to the named pipe's writer
;
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", PIP_writeprobeSET$regs
PIP_writeprobeSET .macro dummy
.wmsg "PIP_writeprobeSET not implemented for C6x."
.endm
;
;# ======== PIP_writeprobeCLR ========
; Disable probing on a pipe's writer
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", PIP_writeprobeCLR$regs
PIP_writeprobeCLR .macro dummy
.wmsg "PIP_writeprobeCLR not implemented for C6x."
.endm
.endif ; if PIP_ is not defined
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -