View topic - MsgWritev() explanation request

MsgWritev() explanation request

For discussion of realtime and/or embedded programming.

MsgWritev() explanation request

Postby gold mind » Mon Oct 24, 2011 1:31 am


I am trying to write the message passing functions using SystemC as a part of my Thesis project in Concordia University. Therefore, I was looking at the QNX website, and particularly at the implementation of the MsgWritev(). Here is a picture attached of what I have in mind about the way message passing is done in QNX.

I'd like to have more details, if possible, about how this function is implemented and know more about how the "offset" is interpreted:
is it considered to be given in bytes or as an index in the sender buffer (ex. start writing to sender_iov[1] if offset is 1)?

Also, knowing that the iov buffer in MsgWritev() should be written to the sender buffer: sender_iov[] at a certain offset, what if the length of sender buffer[index] (sender_iov[i].iov_len) is less than or greater than the length of the iov buffer[index] (iov[i].iov_len)? Should we allow this to happen?

Thank you
Message Passing
(34.08 KiB) Not downloaded yet
gold mind
New Member
Posts: 1
Joined: Mon Oct 24, 2011 1:04 am

Re: MsgWritev() explanation request

Postby mario » Mon Oct 24, 2011 12:49 pm

The doc says: "An offset into the sender's buffer that indicates where you want to start writing the data." The sender's buffer is defined by the parameters specify in the MsgSend*(), the offset are in bytes.

The doc about the size argument of MsgWrite also says:
The number of bytes that you want to write. These functions don't let you write past the end of the sender's buffer; they return the number of bytes actually written.
QNX Master
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 5 guests