Everything

vprb_mem

Outline
Check access permission.
C format
 ER_BOOL  vprb_mem ( VP base, SIZE size, ID tskid, MODE pmmode );
Parameter(s)
I/O
Parameter
Description
I
 VP      base;
Start address for checking
I
 SIZE    size;
Size of checking area (in bytes).
I
 ID      tskid;
ID number of the task.
TSK_SELF: Invoking task.
Value: ID number of the task.
I
 PMMODE  pmmode;
Access mode.

Explanation
This service call checks whether the task indicated by tskid has the access permission indicated by pmmode for the
memory area of size bytes from the address specified by base. This service call returns TRUE when the access is permitted and returns FALSE when the access is not permitted.
The following are specified for pmmode.
   pmmode := ( TPM_READ | TPM_WRITE | TPM_EXEC )
- TPM_READ ( = 0x0001)
Checks whether operand-read access is permitted.
- TPM_WRITE ( = 0x0002)
Checks whether operand-write access is permitted.
- TPM_EXEC ( = 0x0004)
Checks whether execution access is permitted.
Note This service call is the function outside mITRON4.0 specification.
Return value
Macro
Value
Description
TRUE
0
Normal completion. (The access is permitted.)
FALSE
0
Normal completion.(The access is not permitted.)
E_PAR
-17
Parameter error.
- size == 0
- pmmode == 0, One of bits except bit0, bit1 and bit2 of pmmode is 1.
E_ID
-18
Invalid ID number.
- tskid < 0
- tskid > VTMAX_TSK
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
- This service call was issued from non-task.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
E_MACV
-26
Memory access violation.
- Stack pointer points out of user stack for invoking task.
E_NOEXS
-42
Non-existent object.
- The task specified by tskid does not exist.