Addition of c3po library, including revamp of Make system for user libraries.
authorKevin Klues <klueska@cs.berkeley.edu>
Tue, 22 Feb 2011 02:54:01 +0000 (18:54 -0800)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:58 +0000 (17:35 -0700)
commitf6575e9dcefee64488eee01bbb28d395cbb8fd0b
tree31fbfb562da49e1f0a1a5cc347c5e40591ce2efa
parent9141b1d02bdfc0909e0af26647ae4a5189e3ffd0
Addition of c3po library, including revamp of Make system for user libraries.

The c3po library is currently only functional in single core process mode, with
threads that run to completion or yield the processor voluntarily. No AIO
functionality is working yet either. I plan to soon get it working in
multi-core mode so that its threads can be multiplexed on multiple vcores as
well as get the AIO stuff working.  One encouraging thing, however, is that we
are in fact using the linked stack stuff, and the capriccio scheduler code with
only MINOR modifications, and everything seems to be working properly.  A test
application called c3po_test.c has been placed under tests/c3po/ and is based
on a modified version of pthread_test.c.

As it pertains to the Make system revamp, all user libraries are now self
contained in that they include a top level Makefile instead of a Makefrag
dependent on the ros build environment.  In GNUmakefile, these libraries are
built with a recusrive make, rather than including a Makefrag and invoking them
that way.  This change required a small change to the cross compiler Makefile,
but should NOT require a rebuild as it was just modified to be aware of the
reorganization; no actual header files were modified.

I also separated the pthread commands out of libparlib, so they are only now
contained in libpthread and not both.  If you build an app that relies on the
pthread library you now need to icnlude both -lpthread and -lparlib in order to
use them.  This change was necessary now that we are introducing the
libc3po library that implements the pthread functions differently.  To use
c3po, simply include -lc3po and -lparlib together instead of -lpthread.

While making these changes, I also revamped the Make system as it relates to
building tests.  By default, all of the test files in the tests/ directory are
compiled together with -lpthread and -lparlib.  Take a look at the changes to
see how I added a c3po subfolder that allows you to compile other tests with
different Makefile flags.  This process can be emulated to include other
subfolders taht group test files together that require any combiantion of
flags, or settings.

There is also a new install-tests Make target that will put all of the binaries
made during a 'make test' into the bin directory of the first entry in
INITRAMFS_PATHS.
119 files changed:
GNUmakefile
tests/Makefrag
tests/c3po/Makefrag [new file with mode: 0644]
tests/c3po/c3po_test.c [new file with mode: 0644]
tools/compilers/gcc-glibc/Makefile
user/Makefrag [deleted file]
user/c3po/Makefile [new file with mode: 0644]
user/c3po/aio/Makefrag [new file with mode: 0644]
user/c3po/aio/blocking_io.c [new file with mode: 0644]
user/c3po/aio/blocking_io.h [new file with mode: 0644]
user/c3po/aio/check_syscall [new file with mode: 0755]
user/c3po/aio/diskio_aio.c [new file with mode: 0644]
user/c3po/aio/diskio_blocking.c [new file with mode: 0644]
user/c3po/aio/diskio_immediate.c [new file with mode: 0644]
user/c3po/aio/diskio_kthread.c [new file with mode: 0644]
user/c3po/aio/io_internal.h [new file with mode: 0644]
user/c3po/aio/sockio_epoll.c [new file with mode: 0644]
user/c3po/aio/sockio_poll.c [new file with mode: 0644]
user/c3po/coro/Makefrag [new file with mode: 0644]
user/c3po/coro/coro.c [new file with mode: 0644]
user/c3po/coro/coro.h [new file with mode: 0644]
user/c3po/include/README [new file with mode: 0644]
user/c3po/include/bits/pthreadtypes.h [new file with mode: 0644]
user/c3po/include/capriccio.h [new file with mode: 0644]
user/c3po/include/fptrcheck.h [new file with mode: 0644]
user/c3po/include/pthread.h [new file with mode: 0644]
user/c3po/include/semaphore.h [new file with mode: 0644]
user/c3po/include/stackbounds.h [new file with mode: 0644]
user/c3po/include/stacklink.h [new file with mode: 0644]
user/c3po/stack/Makefrag [new file with mode: 0644]
user/c3po/stack/fptr.c [new file with mode: 0644]
user/c3po/stack/stack.c [new file with mode: 0644]
user/c3po/threads/Makefrag [new file with mode: 0644]
user/c3po/threads/blocking_graph.c [new file with mode: 0644]
user/c3po/threads/blocking_graph.h [new file with mode: 0644]
user/c3po/threads/events.c [new file with mode: 0644]
user/c3po/threads/mutex.c [new file with mode: 0644]
user/c3po/threads/pthread.c [new file with mode: 0644]
user/c3po/threads/pthreadtest.c [new file with mode: 0644]
user/c3po/threads/readproc.c [new file with mode: 0644]
user/c3po/threads/readproc.h [new file with mode: 0644]
user/c3po/threads/resource_stats.c [new file with mode: 0644]
user/c3po/threads/resource_stats.h [new file with mode: 0644]
user/c3po/threads/sched_global_rr.c [new file with mode: 0644]
user/c3po/threads/sched_graph_priority.c [new file with mode: 0644]
user/c3po/threads/sched_graph_rr.c [new file with mode: 0644]
user/c3po/threads/semaphore.h [new file with mode: 0644]
user/c3po/threads/threadlib.c [new file with mode: 0644]
user/c3po/threads/threadlib.h [new file with mode: 0644]
user/c3po/threads/threadlib_internal.h [new file with mode: 0644]
user/c3po/util/Makefrag [new file with mode: 0644]
user/c3po/util/atomic.h [new file with mode: 0644]
user/c3po/util/clock.c [new file with mode: 0644]
user/c3po/util/clock.h [new file with mode: 0644]
user/c3po/util/config.c [new file with mode: 0644]
user/c3po/util/config.h [new file with mode: 0644]
user/c3po/util/debug.c [new file with mode: 0644]
user/c3po/util/debug.h [new file with mode: 0644]
user/c3po/util/libperfctr.h [new file with mode: 0644]
user/c3po/util/linked_list.c [new file with mode: 0644]
user/c3po/util/linked_list.h [new file with mode: 0644]
user/c3po/util/object_pool.c [new file with mode: 0644]
user/c3po/util/object_pool.h [new file with mode: 0644]
user/c3po/util/occ_list.c [new file with mode: 0644]
user/c3po/util/occ_list.h [new file with mode: 0644]
user/c3po/util/plhash.c [new file with mode: 0644]
user/c3po/util/plhash.h [new file with mode: 0644]
user/c3po/util/timing.c [new file with mode: 0644]
user/c3po/util/timing.h [new file with mode: 0644]
user/c3po/util/util.h [new file with mode: 0644]
user/c3po/util/utiltest.c [new file with mode: 0644]
user/include/arc.h [deleted file]
user/include/bthread.h [deleted file]
user/include/event.h [deleted file]
user/include/glibc-tls.h [deleted file]
user/include/i686/arch.h [deleted file]
user/include/i686/atomic.h [deleted file]
user/include/i686/bitmask.h [deleted file]
user/include/i686/vcore.h [deleted file]
user/include/mcs.h [deleted file]
user/include/parlib.h [deleted file]
user/include/pool.h [deleted file]
user/include/pthread.h [deleted file]
user/include/rassert.h [deleted file]
user/include/rstdio.h [deleted file]
user/include/sparc/arch.h [deleted file]
user/include/sparc/atomic.h [deleted file]
user/include/sparc/bitmask.h [deleted file]
user/include/sparc/vcore.h [deleted file]
user/include/timing.h [deleted file]
user/include/vcore.h [deleted file]
user/parlib/Makefile [new file with mode: 0644]
user/parlib/Makefrag [deleted file]
user/parlib/include/arc.h [new file with mode: 0644]
user/parlib/include/arch [new symlink]
user/parlib/include/bthread.h [new file with mode: 0644]
user/parlib/include/event.h [new file with mode: 0644]
user/parlib/include/glibc-tls.h [new file with mode: 0644]
user/parlib/include/i686/arch.h [new file with mode: 0644]
user/parlib/include/i686/atomic.h [new file with mode: 0644]
user/parlib/include/i686/bitmask.h [new file with mode: 0644]
user/parlib/include/i686/vcore.h [new file with mode: 0644]
user/parlib/include/mcs.h [new file with mode: 0644]
user/parlib/include/parlib.h [new file with mode: 0644]
user/parlib/include/pool.h [new file with mode: 0644]
user/parlib/include/pthread.h [new file with mode: 0644]
user/parlib/include/rassert.h [new file with mode: 0644]
user/parlib/include/rstdio.h [new file with mode: 0644]
user/parlib/include/sparc/arch.h [new file with mode: 0644]
user/parlib/include/sparc/atomic.h [new file with mode: 0644]
user/parlib/include/sparc/bitmask.h [new file with mode: 0644]
user/parlib/include/sparc/vcore.h [new file with mode: 0644]
user/parlib/include/timing.h [new file with mode: 0644]
user/parlib/include/vcore.h [new file with mode: 0644]
user/parlib/pthread.c [deleted file]
user/pthread/Makefile [new file with mode: 0644]
user/pthread/Makefrag [deleted file]
user/pthread/pthread.c [new file with mode: 0644]
user/pthread/pthread.h [new file with mode: 0644]