Helper program: notify

Sends an event to a process.  You must control the process to be able to
send an event (everyone controls everything, for the most part), and the
process must have an event handler registered.  Similar to 'kill.'

This is similar to the kernel monitor command 'notify', except this has
payloads and that can bypass the event registration table.
BCQ touch-ups (XCC)

Weren't memsetting the entire structure, and I wasted an hour or so
debugging a BCQ with a non-power-of-2 number of elements.

Reinstall your kernel headers.
Updates get_html

Can handle non-port-80 ports and will request a connection close after
the one request.
Fixes loopback checksums

The packet checksum finalization wasn't being performed for loopbacks,
preventing us from making any loopback connections.
Helper, check for the existence of local RKMS

For the local core only.
vcore_idle(): halts a core

MCPs can halt their cores, waiting on an interrupt.  An event sent to an
event queue with EVENT_IPI is sufficient to wake a vcore.  Other IRQs or
races can result in wakeups, either from a fresh vcore context or by
having vcore_idle() return.
Add a regression device.

The regression device is used for regression tests. It is '#Z'
and provides mondata and monctl.

monctl is currently not useful.

mondata on the write side takes monitor commands.

Currently on the read side it returns nothing, but soon
it will return the output of the monitor for that command.

Sample usage:
/ $ echo ps > '#Z/mondata'
     PID Name                 State      Parent
-------------------------------------------------
       1 busybox              WAITING         0
       2 echo                 RUNNING_S       1

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Remove historical file.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Implement ctl command for ktest

echo ktest > '#Z/monctl'
will run any ktests that are built in.
See Documentation/testing.txt

A note on the files:
read monctl will get you all valid commands
write monctl will pass a command and args to monctl,
which are then interpreted and then call functions directly, with
none, some, or all the args depending on what the function is.

read mondata, right now, gets bupkus
write mondata converts the string into an argv[] array and calls
a function called onecmd directly. onecmd runs one monitor command.
Output appears on the console, not in mondata as we might like.

So,
write (e.g. ktest) to monctl -> interpretation -> (e.g.) run_registered_ktest_suites

write to mondata -> convert to argv[] -> onecmd -> command[argv[0]]

So 'mondata' can be read as 'uninterpreted'. This may change if it
is clearly inconvenient.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Clunky adaptive mutexes

Semaphores will spin a bit before sleeping.  The amount of time is up to you
(CONFIG).

Note that you can't always profile the time spent spinning, since we can't
enable IRQs blindly in sem_down().  Even if we still have IRQs disabled when we
trydown(), we'd still deadlock since CVs are implemented with semaphores.

On a similar note, CVs and thus rendezes are implemented under the hood with
semaphores.  It's not clear to me that spinning is the right approach here.

Additionally, Akaros is a non-preemptive kernel, in that kernel code won't be
preempted for other routine kernel code.  If a sem is upped in a routine kernel
message (RKM), then spinning will be harmful if the unblocking RKM is sent to
the spinning core.
Helper program 'm'

Accesses the monitor from userspace, via Ron's #Z.

/ $ m kfunc whatever
/ $ m help
/ $ m nanwan
Kernel alarm helpers

Reset and unset are idempotent, making them much more useful than just
set_alarm.  I might get rid of set_alarm and just have them all be reset
or something.

And if there's an ABS version, you probably want a REL version too.

And the __ locked versions are for use in IRQ handlers (though not for
RKM handlers).  Be careful!
Per-cpu timer control for oprofile sampling

To use oprof now, you need to set the timer, then enable the profiling.
If/when we add other tracers that can be turned on and off, we'll
continue to use this model: set the collection of things to trace, then
start them all at once.

If you don't have the timers turned on, but you run opstart, other
traces, such as TRACE_ME and whatnot (like perhaps writing traces from
userspace via kpoprofile) will still be collected.

I don't have a control for various TRACE_MEs yet.  Maybe we can add one
(like printx).

Some examples:

To turn on the timer on core 0.  This turns on an alarm/IRQ:

$ echo optimer 0 on > /prof/kpctl

Then start the actual profiling/collection:

$ echo opstart > /prof/kpctl

To stop collecting:

$ echo opstop > /prof/kpctl

To turn off all the timers:

$ echo optimer all off > /prof/kpctl

Oh, and you can adjust the timer period if you like.  Default is 1ms.

$ echo optimer period 1000 > /prof/kpctl (period is in usec)
Semaphore blocking optracer

Generates an oprof backtrace whenever a semaphore is downed and will
likely block.  There's a slight chance it won't block and a trace will
still be taken.

To enable tracing, you need to:

$ echo opstart > /prof/kpctl

It is not necessary (or maybe even desirable) to run the optimer sampler
at the same time.
Rename all relevant stuff in gcc to akaros

This is the first step in migrating our cross compiler over to cross
tools.

For default compiler defines, I left __ros__ and friends in there for
the moment.  We should probably phase this out over time.
Migrate glibc stuff to 'akaros' as well
Update the Makefile renaming ros->akaros
Update patches for ros->akaros
Update CROSS_COMPILE for ros->akaros
Make the CXX be called ucb-akaros