+static struct thread *running_thread (void);
+static struct thread *next_thread_to_run (void);
+static struct thread *new_thread (const char *name);
+static void init_thread (struct thread *, const char *name);
+static bool is_thread (struct thread *);
+static void *alloc_frame (struct thread *, size_t size);
+static void destroy_thread (struct thread *);
+static void schedule (void);
+void schedule_tail (struct thread *prev);
+
+/* Initializes the threading system by transforming the code
+ that's currently running into a thread. Note that this is
+ possible only because the loader was careful to put the bottom
+ of the stack at a page boundary; it won't work in general.
+ Also initializes the run queue.
+
+ After calling this function, be sure to initialize the page
+ allocator before trying to create any threads with
+ thread_create(). */
+void
+thread_init (void)