Add interrupt and quit keys to console driver

This patch adds interrupt (by default ctrl-C) and quit (by default ctrl-\)
handling to the console driver, when the ISIG termios flag is enabled (and
this patch enables this flag by default). The application can change these
characters or disable ISIG with ioctls, exactly as in Unix.

The ^C character sends a SIGINT to the (only) process, and ^\ sends SIGQUIT.
By default both abort OSv, but when running Java we get a much more
interesting SIGQUIT handler - it shows a trace of all running threads
and other information.

Note that our line-discipline code currently sits in the console driver
(we do not have ptys yet), so it only applies to the console, not to
SSH connections or the likes.

Also note that by default (before the patch to issue #49), qemu will catch
the ^C and ^\ and won't even pass them to OSv, so apply the patch to #49
(or change the interrupt or quit characters) to see this feature working.

This patch relates to issue #53.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Start using doxygen for OSv's API documention

This patch begins to document OSv's native (non-Linux-compatible) C++ APIs
using Doxygen. With doxygen, functions, classes, and other APIs are
documented using comments inside the source code, similarly to the way
Javadoc is used in the Java world.

After this patch, running "doxygen" generates the documentation in HTML
form (and also ugly ones in LaTeX...) in the "doxyout" directory.
After running "doxygen" in the OSv top-level directory, open your browser to
file://.../doxyout/html/index.html to view this documentation.

This patch adds a doxygen configuration file, "Doxyfile", and documents
three functions in the osv namespace: osv::halt(), osv::poweroff(),
osv::halt().

The format of the resulting documentation is not perfect, but it's not
as bad as I feared, and also the documentation doesn't uglify the code
too much (it mainly impacts the header files), so I now believe it will
better for us than writing man pages (an avenue which I explored
previously).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Gdb: Add "osv runqueue" command

This patch adds a "osv runqueue" command to gdb, which shows the (sorted)
run queue of each CPU. Note that the run queue does not include the thread
currently running - just those which are ready to run.

This command is useful for debugging the scheduler and load balancer, but
is less generally useful than the "osv info threads" command, which lists
all threads, specially marking those which are runnable as well as those
which are running.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Use same version in <linux/version.h> and uname()

We had a different Linux version compiled into uname() (3.7.0) than
we had compiled into other code (via <linux/version.h>).

This patch makes them both pretend to be 3.7.0 - arbitrarily chosen
as the current Linux version at the time OSv was created. The new code
verifies with a static assertion that both files contain the same version,
so if they diverge, uname.c will fail compilation.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Trivial changes to load-balancing scheduler benchmark

Some trivial changes to tst-loadbalance.so. In particular, this benchmark
assumes it is run on two cpus, so don't do anything if that isn't true.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
run.py: configurable bridge name

command line option -b/--bridge added

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>