DragonFly kernel List (threaded) for 2003-11
I am still intrigued and slightly confused by the messaging system
"The messaging API will wrap this basic mechanism into synchronous and
asynchronous messaging functions. For example, lwkt_domsg() will send a
message synchronously and wait for a reply. It will set a flag to hint
to the target port that the message will be blocked on synchronously
and if the target port returns EASYNC, lwkt_domsg() will block.
Likewise lwkt_sendmsg() would send a message asynchronously, but if the
target port returns a synchronous error code (i.e. anything not EASYNC)
lwkt_sendmsg() will manually queue the now complete message on the
reply port itself."
Here is how I interpretted the above:
lwkt_domsg() sends a synchronous message waiting for some kind of
reply. If we get EASYNC from the target we block. What if we don't
lwkt_sendmsg() sends an asynchronous message but if the port returns
anything that isn't EASYNC lwkt_sendmessage will queue its
whole message on the reply port.
What do you mean by "now complete"? If it sends asynchronously why
would it send an incomplete asynchrounous message? Also I would think
that EASYNC would imply that some error occurred while trying to do
something asynchronous. I don't understand the rationale for the
Perhaps a state transition diagram of some kind or a flow chart or
something would help me visualize what is being said. :)
I think I understand the part about mp_SendMsg() working with the
message as it came in synchronously without telling
the message originator to "go away... I'll get it later".
"User<->Kernel messaging interfaces simply employ mp_SendMsg() function
vectors which do the appropriate translation, so as far as the sender
and recipient are concerned the message will be local to their VM
I presume these vectors are how the system call interface is
implemented via messages?
Still trying to understand :). One day I will try to run this at home