-
cre_mbf
acre_mbf
-
ER cre_mbf (ID mbfid, T_CMBF *pk_cmbf );
ER_ID acre_mbf ( T_CMBF *pk_cmbf );
|
|
|
|
ID mbfid;
|
ID number of the message buffer.
|
|
T_CMBF *pk_cmbf;
|
Pointer to the packet containing the message buffer creation information.
|
[Message buffer creation information packet : T_CMBF]
typedef struct t_cmbf {
ATR mbfatr; /*Message buffer attribute*/
UINT maxmsz; /*Maximum message size (in bytes)*/
UINT mbfsz; /*Size of the message buffer area (in bytes)*/
VP mbf; /*Start address of the message buffer area*/
} T_CMBF;
|
This service call can be called from tasks that belong to
Trusted Domain.
The cre_mbf creates a message buffer with message buffer ID indicated by
mbfid according to the content of
pk_cmbf. The acre_mbf creates a message buffer according to the content of
pk_cmbf, and returns the created message buffer ID.
1 ) Message buffer attribute (
mbfatr)
Only TA_TFIFO can be specified for
mbfatr.
-
TA_TFIFO ( = 0x0000)
Task wait queue for sending is managed in FIFO order.
Note Task wait queue for receiving is managed in FIFO order.
2 ) Maximum message size (
maxmsz)
Specify the maximum size of message which can be sent to this message buffer. The size of the reception area specified by
rcv_mbf,
prcv_mbf and
trcv_mbf must be not less than
maxmsz.
3 ) Size of the message buffer area (
mbfsz), Start address of the message buffer area (
mbf)
The application acquires
mbfsz bytes of message buffer area and specifies the start address for
mbf.
It is also possible to specify 0 as
mbfsz. In this case, since message cannot be stored in the message buffer, the message sending task or message receiving task that has performed its operation first will enter the WAITING state. The WAITING state of that task is canceled when the task of another side has performed its operation. Thus, message sending tasks and message receiving tasks are completely synchronized. Note,
mbf is disregarded when
mbfsz is 0.
Note 1 The RI600PX is not concerned of anything of the access permission to the message buffer area. Usually, the message buffer area should be generated to the area other than memory objects and user stacks. When the message buffer area is generated in the memory object, a task with the operand-writie access permission to the memory object might rewrite message buffer area by mistake.
Note 2 The
mITRON4.0 specification defines the function that the kernel allocates message buffer area when NULL is specified for
mbf. But RI600PX does not support this function.
|
|
|
|
|
Normal completion of acre_mbf. (Created message buffer ID)
|
|
|
Normal completion of cre_mbf.
|
|
|
|
|
|
- maxmsz == 0, maxmsz > 65528
- 0 < mbfsz < 8, mbfsz > 65532
- mbfsz == 0 and mbf + mbfsz > 0x100000000
|
|
|
Invalid ID number. (only for cre_mbf)
|
|
|
- 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".
|
|
|
- Stack pointer points out of user stack for invoking task.
- The operand-read access to the area indicated by pk_cmbf has not been permitted to the invoking task.
|
|
|
- The invoking task does not belong to trusted domain.
|
|
|
- mbfsz != 0 and mbf == NULL
|
|
|
No ID number available.(only for acre_mbf)
|
|
|
Object state error. (only for cre_mbf)
- The message buffer specified by mbfid exists.
|