build: convenient shortcut for image with several modules

A previous patch made it possible to run "make image=rogue" when a
module rogue exists, without creating a images/rogue file.

This patch expands this feature to be even more powerful:

First, it allows choosing alternative command lines of a particular
module. For example:

        make image=mgmt.shell

Creates an image with the mgmt module (and its dependencies), and its
command line will be mgmt's "shell" command line (i.e., run just the
shell without the web server) instead of the "default" command line.

Second, instead of specifying just one module to put in the image (plus its
dependencies), we now allow giving a comma-separated list of unrelated
modules, all of which are put in the image. For example:

        make image=memcached,netperf,tests

The default command line of the image will be to run in parallel the
"default" command line of each of the modules, if it exists. In the above
example, the "tests" module has no command line labeled "default", so only
those of memcached and netperf will run, but tests' files will still be
included in the image.

As above, a non-default command line of the module can also be chosen,
for example:

        make image=memcached,mgmt.shell

Will build an image with the memcached and mgmt modules, and will run
in parallel memcached's "default" command line and mgmt's "shell"
command line.

If you want to include some module's files in the image, but not run
its command line, use the special word "none". For example:

        make image=memcached,netperf.none

will create an image with both memcached and netperf's files, but only
run memcached's command line.

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
xen: fix identation of device files

Automatically:
 s/\t/    /g
 s/ +$//

Manually: align constant definitions in block.h

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
loader.ld: merge init_array and ctors into init_array

put all of .ctors, .init_array, .ctors.*, init_array.*
into the init_array section.
This fixes the build for mixed ctors / init_array tooling
and dependencies.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
epoll: fix EPOLLET checking condition

Because bitwise "&" was used instead of logical "&&" the condition
was always false:

  (e & EPOLLET) & !warned = 0x80000000 & 1 = 0

And the warning "EPOLLET ignored" was never printed.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
sched: add thread name attribute

Useful for debugging and pthread_setname_np().

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
trace: record and display thread names

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
sched: name some core threads

idle, load balancer, init.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
xen: name interrupt threads

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
bsd: name some bsd-provided threads

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
dhcp: name the dhcp threads

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
percpu-worker: name the threads

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
rcu: name the threads

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
console: name the console thread

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
virtio: name virtio threads

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
libc: name some internal threads

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
libc: provide pthread_setname_np()

Useful for debugging.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Merge branch 'sched'

Thread names

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>

Conflicts:
	core/sched.cc
	libc/timerfd.cc
trace: update format version for thread_name

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
java: Refactored cli and cloudius packages

Combined java/cli and java/cloudius packages into one.
Added java/cloudius.jar as a jar to the build.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
java: Remove unused build.xml

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>