Squashed commit of the following:

commit 720f89223f4dc5b5117faf530197e583df12dee9
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Apr 2 13:39:05 2014 -0400

    fixed warnings on linux and removed consts

commit 92d1d3708e16fa0e4f62371c496652c36a839de4
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 29 14:10:48 2014 -0400

    fixed shift linked-list bug

commit c8440c6fcb849f340815256a4dbc857cf8ae6951
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 29 12:33:24 2014 -0400

    fixed extra socket ref

commit fbebdd56dd9a4d26d33494fd76c83890009695f4
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 26 15:28:51 2014 -0400

    get the remote task

commit af4bdc81d8b55410ea67356f0b584863ddf59479
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Tue Mar 25 19:27:39 2014 -0400

    added cool save&resign method

commit 1aaeed465adae77f33dae46c9b61a6a1d481a323
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Tue Mar 25 15:47:35 2014 -0400

    that *needs* to be mapped

commit 6f390f567db6f02bdff28cc1feada35a412219dc
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Mon Mar 24 23:01:29 2014 -0400

    wrong way, bro

commit 3d2ade71a97ad2270b738d30738faabf910f9427
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Mon Mar 24 17:34:57 2014 -0400

    added missing file

commit a2bb86ff40159c4a31c6dce1d0e72ca0ce08936f
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Mon Mar 24 17:33:57 2014 -0400

    got rid of *that* feature; added async pt freeing

commit b868d3a052718c837910ae8041c336d1f24c39ac
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Mon Mar 24 17:20:11 2014 -0400

    added concept of task "mappings"

commit 31070333e90bb488e5aaf117fc0158c981de2bb2
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Mon Mar 24 10:05:37 2014 -0400

    added explicit alignment

commit 67ff5c725419602f0b702c7bbaa04412be792a24
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Mon Mar 24 10:02:02 2014 -0400

    fixed alignment test and specified it

commit 46f9c05f7fa8d774943944d6fd4e91b3364657a9
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 19:45:41 2014 -0400

    you can't re-connect a socket

commit 98f8cd96f498932267d5b270e82584cc1bb7b49c
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 18:26:01 2014 -0400

    accurate commenting

commit d5858dd39fc703894b9c5d5a0bc4dbde7dfeb054
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 18:22:11 2014 -0400

    no leaks omg!

commit 14e43ceeafc73c570df3e58f56a56294d26dcf71
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 18:19:30 2014 -0400

    fixed task shutdown to close sockets

commit 44e9ed0039b6a37437dfcd5b6c1a94172e136196
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 18:09:04 2014 -0400

    omg it works with 2 CPUs who would have guessed

commit 7c873bd5a92167f581132e408c1bbc1ecebdc087
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 18:04:25 2014 -0400

    forgot allll about the descriptor number lol

commit d80d8b197a8cb873c8c4ca06f0ce89dbdfc6da8b
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 17:59:55 2014 -0400

    looks like two sockets have the same descriptor

commit 8e23c42b926aa1b705978fad417b3a848960a389
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 17:49:34 2014 -0400

    test has better structure

commit 34d1eeef19736d0c5203145b920d958279953b6d
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 17:40:02 2014 -0400

    delivers messages!

commit 8aa9438db5b8d83f927dd48a1ab8ce4c3fecb9f4
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 16:25:46 2014 -0400

    nothing *breaks* at least

commit b4c582c216265c3b7c680249396180e4da635685
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 16:20:01 2014 -0400

    got rid of hopeless function!

commit 3834cea208281dde5035dd3dccb65a00862a853f
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 15:41:31 2014 -0400

    switched over main impl to use new continuations

commit bf8f8bd09fc40334a2d95a872ea775e45c120482
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 15:33:33 2014 -0400

    save_return_state isn't actually possible

commit 0049e8082d07eccd7dfc98b6d361d292353aa3d5
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 15:22:41 2014 -0400

    getting the wrong base pointer

commit 6040834b2ec26861c32a0fa085bb4068c5728178
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 14:05:37 2014 -0400

    fixed a segfault

commit 57631cabec758ec3e872c16d7157b3c45f2279c5
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 13:38:08 2014 -0400

    added pending feature

commit 76103bb696acfe73598814b629bbe46d8af3706b
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:57:34 2014 -0400

    PID pool + 4 CPU stacks = 5!

commit 9c1ce03715eead40cdd0bd2d3209c5e34451e088
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:47:54 2014 -0400

    4 CPUs = 4 pages of stacks :\

commit aa884c8c827f1a279a58397111fde86231636907
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:45:52 2014 -0400

    that'd be important

commit 22383b7c60d28e340fd4a5d71f57bd6993129395
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:44:40 2014 -0400

    trying to figure out the source of these aborts

commit 5b7b844e49b3cd349a90535ec6d83e9fbb52e00a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:21:21 2014 -0400

    weird "Bus error: 0"

commit 82c7cad4fee947a2365a3bc918ce61165d47b1db
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:18:06 2014 -0400

    sockets would never have closed

commit 95fe1ee80d344bce27bff158856254c571b12fb7
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:16:31 2014 -0400

    fixed loop segfault

commit 268668f06e82377a754a12dda2c6fa0cc8d50dd3
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 12:03:11 2014 -0400

    sometimes _next_thread segfaults

commit 3853ee9b2df7b6762c7f9a0e327b846003f7c3e4
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 11:59:07 2014 -0400

    leaking, and sometimes getting segfault

commit 2c8a26d109cf1c8d88d877dc6f7b344fb2d46aed
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 11:42:01 2014 -0400

    fixed problem with no tasks running

commit 48c5c1ea448e2a9fd9d4ea6fce0ab28375f27fba
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 11:35:54 2014 -0400

    for some reason, it segfaults

commit 0e36244d669e51c85eefbb61bef0dc9ebaf65942
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 10:45:53 2014 -0400

    created a multithreading test; fails

commit 6d995f6c0347cdce509f68a7131e827fdbc6467a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sun Mar 23 10:29:05 2014 -0400

    running thread works!

commit 25c7a79d4539181efd3ca43b69da25107e339a34
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 22:08:51 2014 -0400

    updated readme

commit 2dd532ab3405a8f5b9d2e9e6c044b8af44b9c98f
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 22:01:16 2014 -0400

    still getting segfault

commit 27025266136cac3afb6184df689539c79429a195
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 21:59:22 2014 -0400

    meant unlock, not lock

commit 1835dc59de16381150b5746eb44e88fad347aec1
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 21:43:28 2014 -0400

    it gives a segfault; still cool

commit 3539e26a8ac2aacb4ea247018d9b59bfd5039d7f
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 21:35:34 2014 -0400

    added user_thread sources

commit bd90f10b16b064f0fcd5bae220404f986b86f1d4
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 21:06:19 2014 -0400

    implemented timer interrupt

commit 5cf2652e364ec161f5179f03c21198432cc0291e
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 20:55:33 2014 -0400

    tests compile, not implemented yet though

commit 3b1a7edb777887c50329d98a5af056a73080ad9c
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 19:53:35 2014 -0400

    implemented VM

commit ecf8ac9f56aa55db8cba8ef3e31820cf37b365cc
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 19:38:38 2014 -0400

    forgot to do *that*

commit 8a58c67643f1137a02121a2d617da8c40d6c7a6a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 19:37:12 2014 -0400

    setup threading & timer

commit a5ebfb201b57eb83e1ae469145ef5e3050e2d1ed
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 18:50:02 2014 -0400

    setup testing build env

commit 59c0879cddac05044a1867ef35bcb4978238b308
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 18:37:08 2014 -0400

    started working on local api

commit bcc16e2062484c26dc48d0a8704622dc98d43e01
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 15:34:32 2014 -0400

    layed out threading impl

commit 406ddc465b12f5ebae70c41bc0e6d869a8409ade
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 15:23:30 2014 -0400

    proper task cleanup

commit 8327a73995425303d851cfa6195cbeecab0421ed
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 14:58:25 2014 -0400

    added function comments

commit be445f7085dada6d7ae31fffa844f5f05b948abd
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 14:35:01 2014 -0400

    sockets implementation compiles

commit 1241920b1885b592fdc6790f1df5a94eed865a0c
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 14:22:37 2014 -0400

    haven't tried compiling anything

commit 6fcd0293e05b1269c9723736571ef4eb223e0631
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 11:14:47 2014 -0400

    deleted the bad code

commit 4fbf37a76e7ce84caeaade54d8bbfc380856aaf5
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 11:13:27 2014 -0400

    added all sucky code

commit 248800751eb2abc9d7603652415f367e0961780e
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Sat Mar 22 11:13:21 2014 -0400

    this code sucks

commit e827f77b9726e49c00c0790202fff093ef1b03ad
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 20:19:10 2014 -0400

    i've hit a wall

commit ee44afa9104bed2046de15aa2792375db80ada5b
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 19:03:20 2014 -0400

    implemented socket stuff

commit 1c335098084d0e62673469c1ca77def1b56093f1
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 15:55:48 2014 -0400

    boom, better page fault handler

commit b1babb2d000b80094b45fda7bf2ec2bf6c4ed05c
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 15:44:17 2014 -0400

    implemented task exit, page fault handler

commit cea67b381c024015f863bc2ad98d4485715722b2
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 15:14:28 2014 -0400

    updated some comments

commit 59dfd10143dd5c4d14e8f62f7de3dca3273cfc59
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 15:10:07 2014 -0400

    thanks, -Wall

commit 5e7d016014c5137165566d3e3710f964e84acf94
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 15:08:46 2014 -0400

    fixed issues

commit 60cd8abe09ecc175955eb97cb491722ecef101cf
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 15:07:54 2014 -0400

    i believe that i fixed the stack issue

commit 9e794b63116278989d4821a63701834491a3129c
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 14:53:16 2014 -0400

    realized stack issue is there, meh

commit 34c47acfce5c7138019c4155203903d9e636746a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 12:53:09 2014 -0400

    added needed include

commit f40d14bfd37627e47334c4d0bd023dc14149971a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 12:49:01 2014 -0400

    done initial loop implementation

commit 4790f044cdc8303042b80f5ae8eef40815adc2dd
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 12:46:28 2014 -0400

    about to implement the last loop method!

commit 68472e2953642c4f76e51c85383f5c8452c6de3a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 11:29:46 2014 -0400

    added looping routine

commit d5d90a296220f19c536be4a148d7e1b6cba12e62
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 10:31:03 2014 -0400

    added anscheduler_loop_delete()

commit 0393b848d87a895931751b955b7240452ecf784b
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 10:17:35 2014 -0400

    figured out how loop will work with killing

commit 32d414182c8aaf9efe17e78ea77a259990764ea2
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 09:36:15 2014 -0400

    new PID mapping

commit 027c1d7d7fd495719363971d80487fbefda73c5a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Fri Mar 21 08:35:44 2014 -0400

    found a place to put this stuff

commit 9ce5c6bace701b442577279491c5e34a93d2f1fa
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Thu Mar 20 10:19:16 2014 -0400

    better free methods; alloc/dealloc PIDs

commit 26c5ad6ca497aa4fdc23a1b68423ec447105b0a4
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Thu Mar 20 10:03:43 2014 -0400

    fixed syntax error

commit a8d337ba51b08d4fea6d6b45edefd5911e27c702
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Thu Mar 20 10:03:13 2014 -0400

    fully implemented thread exit

commit 358bca7cf18d45af51eadc8377bf17695040ff7e
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Thu Mar 20 09:26:17 2014 -0400

    implemented user-stack deallocation

commit 0efa06cef19337fcc5796e68deb81e77f277b8f1
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 22:30:21 2014 -0400

    started figuring out how i'll do thread killing

commit 57a297952ae50d554313ffe79a243c74485d19a1
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 21:41:34 2014 -0400

    added poll implementation

commit 0d4630ad9af205d9fa85cb6ff0e9bb98ff3e597a
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 20:45:18 2014 -0400

    add thread to loop

commit bb3850be32b278524753c0c6edb107b5db4c475f
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 20:40:26 2014 -0400

    added thread creation

commit b2c43bc4ecfeb6f8b44df5f8aa89fca50611bf31
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 20:40:19 2014 -0400

    added interrupts idea

commit 2a3e6b5917ece1b888854ed9a12a10da6fb641fb
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 19:45:17 2014 -0400

    compiles

commit d231fece5a6c2157e4246ba77848d44eda7575cd
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 19:41:51 2014 -0400

    fixed util.c

commit 6079ef926e37f0fbdb3e27a29f2e5688cf888b0c
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 19:33:10 2014 -0400

    started trying to build

commit 04123f5bb732a0fa4603298d2e1de335bd77d3e8
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 19:30:44 2014 -0400

    about to add subtree

commit 5cf6381daa6eebc69ef2157f81c0b1b8e34b9464
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 18:42:50 2014 -0400

    finished up task killing implementation

commit 9e62afb5e43ddc1939d9142d273bab20af39ebac
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 18:37:34 2014 -0400

    could have leaked code on fork fail

commit 780f8c1a11adf95ef132928ce8b0ca64b6536ba7
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 18:35:44 2014 -0400

    gotta figure out how2 compile this

commit 7c69757140cc651f65686eb95de1b4f3f07af46f
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Wed Mar 19 16:16:28 2014 -0400

    i think it's pretty much setup

commit 48c84d4dac8ebcde3a1e00e39fddf1c664457c68
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Tue Mar 18 20:59:07 2014 -0400

    started laying out how it'll work

commit f1b707f43df96db52fb192ce1486c248711c33a2
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Tue Mar 18 17:47:51 2014 -0400

    added more beef to headers

commit 4c29d1fd01db20a5479f78a29e97a05aa81db3ca
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Tue Mar 18 11:04:12 2014 -0400

    defines

commit acc415334ffe5235a613af305c6c6b1e66565028
Author: Alex Nichol <unixpickle@gmail.com>
Date:   Tue Mar 18 10:27:49 2014 -0400

    added mission statement
removed unused header