summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Brian Norris [Sat, 10 Mar 2012 03:06:31 +0000 (19:06 -0800)]
libthreads: use 'void' in argument list
Brian Norris [Sat, 10 Mar 2012 03:04:00 +0000 (19:04 -0800)]
libthreads: export thread_yield()
We export this for now. The function will need to change for long-term exported
use though.
Brian Norris [Sat, 10 Mar 2012 02:22:50 +0000 (18:22 -0800)]
schedule: return next thread pointer directly
It's better to just return a pointer to the 'next' thread, rather than
sending it through the argument list.
Brian Norris [Sat, 10 Mar 2012 02:22:11 +0000 (18:22 -0800)]
schedule: include libthreads.h
Brian Norris [Sat, 10 Mar 2012 02:21:12 +0000 (18:21 -0800)]
Makefile: turn on all warnings
(That's how I caught the previous error...)
Brian Norris [Sat, 10 Mar 2012 02:20:39 +0000 (18:20 -0800)]
libthreads: include schedule.h (previous mistake...)
Brian Norris [Sat, 10 Mar 2012 01:46:46 +0000 (17:46 -0800)]
Makefile: use ${CC} instead of hardcoding gcc
Brian Norris [Sat, 10 Mar 2012 01:37:05 +0000 (17:37 -0800)]
common.h: move common code (non-user) to header
Enable us to include libthreads.h in a "user program".
Brian Norris [Sat, 10 Mar 2012 01:28:15 +0000 (17:28 -0800)]
libthreads: add thread_current() function
Keeps along the lines of C11/C++11.
C11: thrd_t thrd_current(void);
C++11: namespace this_thread
Brian Norris [Sat, 10 Mar 2012 01:10:35 +0000 (17:10 -0800)]
libthreads: remove unused codepath
Brian Norris [Sat, 10 Mar 2012 01:08:21 +0000 (17:08 -0800)]
libthreads: cleanup startup/exit functions
Free the stacks
Push thread exit management into thread_wait_finish() function
Brian Norris [Sat, 10 Mar 2012 01:05:48 +0000 (17:05 -0800)]
modify "user program"
Brian Norris [Sat, 10 Mar 2012 00:49:03 +0000 (16:49 -0800)]
schedule: set thread to NULL when there is no next thread
Brian Norris [Fri, 9 Mar 2012 23:31:45 +0000 (15:31 -0800)]
reformat DEBUG messages
Brian Norris [Fri, 9 Mar 2012 23:18:57 +0000 (15:18 -0800)]
libthreads: export thread_join() in header
Brian Norris [Fri, 9 Mar 2012 23:18:07 +0000 (15:18 -0800)]
libthreads: merge thread_create() and thread_start()
Brian Norris [Fri, 9 Mar 2012 07:36:48 +0000 (23:36 -0800)]
schedule: add scheduler, thread_yield(), etc.
Could use some cleanup still...
Brian Norris [Fri, 9 Mar 2012 07:36:20 +0000 (23:36 -0800)]
libthreads: fixups
Brian Norris [Fri, 9 Mar 2012 00:12:01 +0000 (16:12 -0800)]
libthreads: cleanup main thread initialization
Create a "thread" for the primary context, rather than handling special logic
for a separate "cleanup" ucontext_t.
Brian Norris [Fri, 9 Mar 2012 00:03:45 +0000 (16:03 -0800)]
add "make tags" (using `ctags`)
Brian Norris [Thu, 8 Mar 2012 23:41:34 +0000 (15:41 -0800)]
libthreads: create header file
Brian Norris [Thu, 8 Mar 2012 23:32:23 +0000 (15:32 -0800)]
libthreads: remove superfluous code
The thread.started field is unnecessary for now.
The initial getcontext() call is unecessary as well. swapcontext() is
better for most instances where we are not creating a new thread.
Remove question mark ('?') from last statement.
Brian Norris [Thu, 8 Mar 2012 02:13:16 +0000 (18:13 -0800)]
add .gitignore
Brian Norris [Thu, 8 Mar 2012 02:10:59 +0000 (18:10 -0800)]
initial commit
Basic working copy of "threads," which execute until completion as soon as
they are launched.