RIOT-OS/RIOT — pull request #396 by kaspar030 (2013-12-02 16:59:03+00:00)
Title: introduce msg API to send messages with accompanying buffer

This implementation doesn't break old-style API, e.g., code not using "big msgs" doesn't need changes.

Use case: This is useful when sending messages over network links where there's no shared memory space.

Usage:
Sender:
1. set content.ptr to the buffers pointer,
2. set new field "size" to the size of the buffer you want to copy

Receiver:
1. allocate buffer
2. see sender. ;)

Semantics:
If sender sends old-school message, it gets delivered as usual.
If sender sends a big message to a receiver that either has no buffer space or it's space is too small, msg_send returns "-2", receiver stays unaffected.
If sender sends a big message and the receiver as enough space, the extra data will be copied.

In order to use this, the sender *must* check the return code of msg_send.

This does not work yet when the receiver has a message queue.