about summary refs log tree commit diff
path: root/src/rt/circular_buffer.cpp
AgeCommit message (Collapse)AuthorLines
2012-04-03Refactor includes structure, getting rid of rust_internal.hJon Morton-1/+3
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-01rt: Assert things that are trueBrian Anderson-1/+1
2012-04-01rt: Convert an old warning to an assertBrian Anderson-5/+1
2012-04-01remove rust_srvJon Morton-2/+6
2012-04-01replace assertion macros with plain assertsJon Morton-24/+24
2012-03-12rt: Remove arbitrary limit on size of port queue. Closes #1245Brian Anderson-1/+0
2011-08-01Enabling logging in circular_buffer again.Eric Holk-44/+44
2011-07-28Made task threads wait instead of sleep, so they can be woken up. This ↵Eric Holk-1/+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-42/+42
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-21Lots of work on memory tracking and channels.Eric Holk-11/+11
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-13Fix compile-command lines in rt.Graydon Hoare-1/+1
2011-07-07Fixed two races.Eric Holk-0/+2
The first is that the memory_region destructor would complain there is still an outstanding allocation. This is because circular_buffer from rust_chan wasn't refing its task, so the task was being destructed too soon. The second was where the program could deadlock while joining a task. The target task would die in the time between checking whether the task should block and then actually blocking. The fix is to use the target task's lock.
2011-06-29Re-enable tidy (it was broken) and fix various non-tidy things.Graydon Hoare-1/+2
2011-06-28Renamed what's left of rust_dom to rust_schedulerEric Holk-35/+35
2011-06-28Removed dom_owned, splitting things between task_owned and kernel_owned. Had ↵Eric Holk-8/+9
to re-xfail a few tests brson recently un-xfailed.
2011-04-19Overhaul logging system in runtimeMarijn Haverbeke-18/+12
See https://github.com/graydon/rust/wiki/Logging-vision The runtime logging categories are now treated in the same way as modules in compiled code. Each domain now has a log_lvl that can be used to restrict the logging from that domain (will be used to allow logging to be restricted to a single domain). Features dropped (can be brought back to life if there is interest): - Logger indentation - Multiple categories per log statement - I possibly broke some of the color code -- it confuses me
2011-04-07Move to macro-based logging checks in the C++ codeMarijn Haverbeke-8/+8
No functions should be called for log statements that turn out to be inactive.
2011-01-10Cleanup circular_bufferBrian Anderson-39/+52
2011-01-10Remove the assumption that circular_buffer's buffer has a power of two sizeBrian Anderson-25/+51
It was not obvious how to make this implementation work when the unit size was not also a power of two, so for now just make the buffer size a multiple of the unit size so it can pass all the tests.
2011-01-10Cleanup circular_buffer grow / shrink routinesBrian Anderson-4/+7
2011-01-10Fix circular_buffer growth when _next != 0Brian Anderson-6/+7
2011-01-10Remove tabsBrian Anderson-1/+1
2011-01-10Don't allow circular_buffer to shrink below its original size when unit_sz ↵Brian Anderson-5/+4
is not a power of two
2011-01-10Don't allow circular_buffer to shrink below it's initial sizeBrian Anderson-1/+3
2011-01-10Fix the check for growing the circular_bufferBrian Anderson-1/+1
2011-01-07Correctly initialize circular_buffer to a power-of-two bytesBrian Anderson-1/+2
2010-08-16Un-xfailed working tests.Michael Bebenita-1/+2
2010-08-16Pulled rust_srv in its own file. Some cleanup, and added varargs to ↵Michael Bebenita-1/+1
assertion macros.
2010-08-11Ignore upcall_flush for channels that are disassociated from ports. This ↵Michael Bebenita-0/+5
makes task-comm-10 break a little less hard, but it still leaks because messages pending in the channel are never freed.
2010-08-09Some pretty printing in the runtime.Michael Bebenita-3/+1
2010-07-28Let circular buffers actually grow to max sz, reset _next when resizing.Michael Bebenita-5/+7
2010-07-28Change unread-on-destroy condition for circular buffer to merely a warning.Michael Bebenita-1/+1
2010-07-28Add comment explaining NULL case in circular_buffer::enqueue and add logging ↵Michael Bebenita-1/+7
to ::dequeue.
2010-07-28Add peek method to circular buffer.Michael Bebenita-0/+5
2010-07-28Change _unit_sz to unit_sz and make public in circular_buffer.Michael Bebenita-14/+15
2010-07-28Make circular buffer use only power-of-two sizes, cheaper arithmetic.Michael Bebenita-2/+12
2010-07-19Fixed circular buffer resizing bug.Michael Bebenita-16/+20
2010-07-19Added a message passing system based on lock free queues for inter-thread ↵Michael Bebenita-0/+118
communication. Channels now buffer on the sending side, and no longer require blocking when sending. Lots of other refactoring and bug fixes.