cre_mbf
acre_mbf
ER cre_mbf (ID mbfid, T_CMBF *pk_cmbf );
ER_ID acre_mbf ( T_CMBF *pk_cmbf );
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.
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.
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.
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.