This reworks the internal accounting of which CPUs need to perform
the task to be in terms of a CPU mask rather than a count. This
allows us to detect that a CPU was unplugged and to stop waiting
for it to execute the task.
Also fix an inconsistency between SMP/non-SMP mp_sync_exec. On
non-SMP, the task was being executed potentially with interrupts
enabled.
Change-Id: I7c6229f81cc2890558627f3e4b60002e76a938c9
Rather than manually sanity-checking each field of a 'valid'
message, relocate these checks into helper functions. This should also
make the code more readable: it's easy to identify a simple error case
with the condition "!is_message_valid(msg)".
Change-Id: If878b46be00dbf93e1a672ea025fb620ba0b9c28
Preventing the use of unpredictable 'clang-format' versions should
reduce the amount of style inconsistencies found in Magenta.
Change-Id: Icfee510fa075813d33ebc878b47ed3971d9cc22a
Currently, when the remoteio handler receives a malformed message, it
sets msg.arg to "ERR_IO", but only discards the handles when the
"msg.hcount" field is malformed. If the "msg.datalen" field is
malformed, then the handles are still sent, along with the "ERR_IO".
If mx_rio_txn sees an error in the "msg.arg" value, it discards all
handles anyway. In the case an error occurs, why not short-circuit and
prevent those handles from being sent in the first place?
Change-Id: I4c1bb9c56dce84e9af40cba701dda7d36a7b30f4
status = sys_handle_get_info(handle, topic, out_info);
Two implemented topics
MX_INFO_HANDLE_VALID
Just returns if the handle is valid.
MX_INFO_HANDLE_BASIC
Returns the type and the rights and wether is waitable.
Change-Id: I142bb240fa799735276782a2c5d8cbe7adf49bfa
This adds a top-level "tools" target to make it easy to
build (and find) the development host tools (bootserver and
loglistener). It also changes the top-level default target to
one that includes the host tools as well as the boot image.
Change-Id: I92b16a19efc85e9c8cb6e303849e2c1c651d2b5c