Revamp the initial lwkt_abortmsg() support to normalize the abstraction. Now
a message's primary command is always processed by the target even if an
abort is requested before the target has retrieved the message from the
message port. The message will then be requeued and the abort command copied
into lwkt_msg_t->ms_cmd. Thus the target is always guarenteed to see the
original message and then a second, abort message (the same message with
ms_cmd = ms_abort) regardless of whether the abort was requested before
or after the target retrieved the original message.
ms_cmd is now an opaque union. LWKT makes no assumptions as to its contents.
The NET code now stores nm_handler in ms_cmd as a function vector, and
nm_handler has been removed from all netmsg structures.
The ms_cmd function vector support nominally returns an integer error code
which is intended to support synchronous/asynchronous optimizations in the
future (to bypass messaging queueing and dequeueing in those situations
where they can be bypassed, without messing up the messaging abstraction).
The connect() predicate for which signal/abort support was added in the last
commit now uses the new abort mechanism. Instead of having the handler
function check whether a message represents an abort or not, a different
handler vector is stored in ms_abort and run when an abort is processed
(making for an easy separation of function).
The large netmsg switch has been replaced by individual function vectors
using the new ms_cmd function vector support. This will soon be removed
entirely in favor of direct assignment of LWKT-aware PRU vectors to the
messages command vector.
NOTE ADDITIONAL: eventually the SYSCALL, VFS, and DEV interfaces will use
the new message opaque ms_cmd 'function vector' support instead of a
command index.
Work by: Matthew Dillon and Jeffrey Hsu