about summary refs log tree commit diff
path: root/src/rt/rust_kernel.h
AgeCommit message (Collapse)AuthorLines
2012-07-20[1/4 for #2365, #2671] Fix create/kill race with schedulers and tasks during ↵Ben Blum-1/+5
rust_kernel::fail
2012-06-13Add a malloc_dyn upcall for dynamically sized allocations on the shared heap.Michael Sullivan-0/+11
2012-06-02rt: Improve docs for main, kernel, scheduler, and taskBrian Anderson-9/+35
2012-04-30core: Serialize all access to the environment using a weak global taskBrian Anderson-0/+3
2012-04-27rt: remove unneccesary c++ functions and rust_kernel data, re: global loopJeff Olson-3/+0
2012-04-20replace impl of globa_async_handle with one using atomic compare-and-swapJeff Olson-5/+3
2012-04-20don't use ::malloc for initializing the global_async_handle in rust_kernelJeff Olson-0/+1
2012-04-20rt: whitespace cleanup for existing libuv integrationJeff Olson-7/+7
2012-04-20add needed fields for global libuv loop + bindings to manage from rustJeff Olson-0/+9
adding two pointers fields to rust_kernel :( .. have to do manual malloc/free for one of the fields, which feels wrong
2012-04-07core: Add priv::weaken_taskBrian Anderson-0/+15
2012-04-03Merge remote-tracking branch 'brson/mainthread'Brian Anderson-1/+15
Conflicts: src/rt/rust_kernel.cpp src/rt/rust_scheduler.cpp src/rt/rust_scheduler.h
2012-04-03rt: Fix bugs in the osmain schedulerBrian Anderson-0/+2
2012-04-03rt: Futz with headers to satisfy FreeBSDBrian Anderson-1/+2
2012-04-03fix 'I don't know how C works'Jon Morton-0/+2
2012-04-03actually remove memory.h; include cleanupsJon Morton-7/+3
2012-04-03Refactor includes structure, getting rid of rust_internal.hJon Morton-0/+21
Many changes to code structure are included: - removed TIME_SLICE_IN_MS - removed sychronized_indexed_list - removed region_owned - kernel_owned move to kernel.h, task_owned moved to task.h - global configs moved to rust_globals.h - changed #pragma once to standard guard in rust_upcall.h - got rid of memory.h
2012-04-03core: Add a scheduler mode, osmain, to spawn onto the main schedulerBrian Anderson-0/+2
2012-04-02rt: Run a single-threaded scheduler on the main threadBrian Anderson-1/+11
2012-04-01remove rust_srvJon Morton-5/+1
2012-03-31rt: Introduce rust_sched_reaperBrian Anderson-1/+5
This just moves the responsibility for joining with scheduler threads off to a worker thread. This will be needed when we allow tasks to be scheduled on the main thread.
2012-03-15rt: Remove the kernel task tableBrian Anderson-6/+1
2012-03-15rt: Look up ports through a single port tableBrian Anderson-0/+10
Instead of a two-level lookup, just use one big table
2012-03-01rt: Remove rust_kernel::live_tasks. UnusedBrian Anderson-5/+1
2012-02-27rt: Don't zero new stacksBrian Anderson-0/+1
2012-02-27rt: Change the way the kernel exits to avoid pthread leaksBrian Anderson-5/+7
This makes the kernel join every scheduler thread before exiting in order to ensure that all threads are completely terminated before the process exits. On my machine, for 32-bit targets, this was causing regular valgrind errors.
2012-02-09fix build on freebsdJyun-Yan You-1/+1
2012-02-08rt: Hold schedulers in a mapBrian Anderson-3/+6
2012-02-08rt: Refactor the rust_kernel interface a bitBrian Anderson-4/+5
2012-02-08rt: Delete schedulers immediately upon releaseBrian Anderson-1/+0
This will be needed once we support dynamically changing schedulers.
2012-02-08rt: Change the scheme used for terminating the kernelBrian Anderson-0/+9
Instead of joining on the scheduler threads, instead keep a count of active schedulers. When there are no more schedulers raise a signal for the main thread to continue. This will be required once schedulers can be added and removed from the running kernel.
2012-02-04rt: Expand rust_kernel::live_tasks to a uintptr_tBrian Anderson-1/+1
2012-02-04rt: Stop using atomic ops on rust_kernel::live_tasksBrian Anderson-3/+4
These ops are all done within spitting distance of a suitable lock, so just protect it with the lock.
2012-02-03rt: Clean up the way the kernel tracks tasksBrian Anderson-6/+10
2012-02-03rt: Do all task creation through a schedulerBrian Anderson-3/+2
2012-02-03rt: Extract rust_scheduler from rust_task_threadBrian Anderson-17/+4
2012-02-03rt: Rename rust_scheduler to rust_task_threadBrian Anderson-4/+4
2012-02-02rt: Only wake up all schedulers when no tasks are leftBrian Anderson-1/+1
At the moment there's not really any reason to be raising this signal, since they schedulers wake up periodically anyway, but once we remove the timer this will be how the schedulers know to exit.
2012-01-29rt: Make the initial segment of the main task's stack 1MBBrian Anderson-1/+3
This is a trick to fool microbenchmarks. Closes #1681
2012-01-12libcore: Add sys::set_exit_statusBrian Anderson-1/+3
Sets the process exit code
2011-09-23rt: Add a RUST_TRACK_ORIGINS debug flag to help track down memory corruptionPatrick Walton-0/+5
2011-08-10rt: Shutdown gracefully on failureBrian Anderson-0/+2
When the kernel fails, kill all tasks and wait for the schedulers to stop instead of just exiting. I'm sure there are tons of lurking issues here but this is enough to fail without leaking (at least in the absence of cleanups).
2011-08-08Introduced task handles.unknown-2/+6
This is the new way to refer to tasks in rust-land. Currently all they do is serve as a key to look up the old rust_task structure. Ideally they won't be ref counted, but baby steps.
2011-07-29Add sched_threads rt function to get the number of scheduler threadsBrian Anderson-3/+1
2011-07-29Removing proxies and message queues.Eric Holk-76/+1
2011-07-28Do all runtime calls to getenv at initializationBrian Anderson-0/+2
getenv is not threadsafe and (maybe as a result) it's randomly crashing with CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their own.
2011-07-28Made task threads wait instead of sleep, so they can be woken up. This ↵Eric Holk-0/+1
appears to give us much better parallel performance. Also, commented out one more unsafe log and updated rust_kernel.cpp to compile under g++
2011-07-28Per-thread scheduling. Closes #682.Eric Holk-22/+20
Tasks are spawned on a random thread. Currently they stay there, but we should add task migration and load balancing in the future. This should drammatically improve our task performance benchmarks.
2011-07-28Made root_task no longer special.Eric Holk-0/+2
2011-07-21Lots of work on memory tracking and channels.Eric Holk-2/+2
We're trying to get closer to doing correct move semantics for channel operations. This involves a lot of cleanup (such as removing the unused sched parameter from rust_vec constructor) and making circular_buffer kernel_owned. Added tagging for memory allocations. This means we give a string tag to everything we allocate. If we leak something and TRACK_ALLOCATIONS is enabled, then it's much easier now to tell exactly what is leaking.
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-2/+2