- Feb 28, 2013
-
-
Avi Kivity authored
There's no reason for it.
-
Avi Kivity authored
There are actually no interactions between msix registrations of different drivers, so it doesn't help to use a global instance. We can simplify the interface by making it local, and also remove locking considerations.
-
- Feb 27, 2013
-
-
Avi Kivity authored
We also make the deleter configurable so we can use munmap() or similar to destroy the stack of payload threads.
-
Avi Kivity authored
This reverts commit e917ab25. If we have an assert, it can break badly, as printf() inside the assert allocates. Will reinstate after adding emergency allocators.
-
Avi Kivity authored
Mutexes are now allocation free and thus safe for use within the allocator.
-
Avi Kivity authored
We need to make them a little more complicated.
-
Avi Kivity authored
Previously, we performed idle processing in the scheduler, in the context of the thread that is being scheudled out. This makes preemption more complicated, since every thread can potentially be in the idle loop simultaneously, having been preempted there some time in the past. Obviously we can't disable interrupts in the idle loop. Move idle processing to its own thread to fix this problem. This is currently sub-optimal since we don't have priority classes yet (or even just priorities), so the idle thread can be scheduled before workload threads. If that happens it will examine the runqueue and yield if there's anything there.
-
- Feb 26, 2013
-
-
Avi Kivity authored
These variants unlock a mutex while sleeping (but keep it locked while evaluating the predicate) and thus are suitable for more complicated predicates that cannot be evaluated atomically.
-
Avi Kivity authored
See README for instructions.
-
- Feb 25, 2013
-
-
Avi Kivity authored
prex code depends on this. TODO: make it optional
-
Avi Kivity authored
It just adds complexity, and doesn't reduce locking overhead, as we must take the spinlock anyway during unlock. Remove it, since it makes conversion to a recursive mutex (needed by fs/vfs/vfs_mount.c) more complicated.
-
- Feb 23, 2013
-
-
Avi Kivity authored
While easy to use, auto-starting threads generates problems when more complicated initialization takes place. Rather than making auto-start optional (as Guy suggested), remove it completely, to keep the API simple. Use thread::start() to start a thread. Unstarted threads ignore wakeups until started.
-
- Feb 21, 2013
-
-
Christoph Hellwig authored
-
- Feb 20, 2013
-
-
Christoph Hellwig authored
Imported from prex. Note that the test isn't wired up yet as we'll need more infrastructure changes to run it.
-
Christoph Hellwig authored
-
- Feb 19, 2013
-
-
Avi Kivity authored
Instead, spin for a bit looking for work to do, then enter a low-power state and wait for an interrupt to pull us out of it.
-
Avi Kivity authored
-
Avi Kivity authored
The whole idea of namespaces is to prevent namespace pollution, using a "using namespace" in a header negates that. Remove.
-
Avi Kivity authored
-
Avi Kivity authored
Add a detached thread class (with a private destructor, so it can only be allocated on the heap). The implementation uses a reaper thread to wait until the detached thread is dead, and then ->join() and delete it.
-
Avi Kivity authored
fixes loading unit tests with "main" as the entry point.
-
- Feb 18, 2013
-
-
Guy Zana authored
-
Christoph Hellwig authored
This is like printf() but prints straight to the console instead of going through the stdio library, the VFS and the device layer. To be used for debugging outout in the kernel.
-
- Feb 17, 2013
-
-
Avi Kivity authored
Protect the array with a cpu_set (bit set -> corresponding queue non-empty). This means we need to scan one word, instead of nr_cpus (plus of course all the cpus for which an incoming is waiting).
-
Avi Kivity authored
Supporting up to 64 cpus for now.
-
Avi Kivity authored
This fixes an issue where a symbol exists in multiple objects; when just one is loaded it is resolved to one of the modules, but after the second is loaded, it resolves to the second. To the program this appears as if the address or contents of a static variable has changed. In our case this was triggered by both statically and dynamically linking a library.
-
- Feb 14, 2013
-
-
Avi Kivity authored
Currently, we have an atomic _waiting state for a thread, and additional non-atomic _on_runqueue and _terminated states. This is problematic since a ->wake() racing with a ->stop_wait() can cause a thread to be simultaneously running and queued. Fix by using a single atomic variable for all theses states.
-
Avi Kivity authored
When we migrate a thread, remove its timers from the cpu-local timer list, and move them back when we complete migration.
-
- Feb 13, 2013
- Feb 12, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Avi Kivity authored
We need to put ourself back in wait mode after every loop iteration, otherwise a spurious wakeup can result in the predicate returning false, and then we will never wait again, instead spinning endlessly.
-
Guy Zana authored
-
Avi Kivity authored
Pack the mutex by placing small fields next to each other. This fixes sizeof(cond_var) becoming larger than sizeof(pthread_cond_t), and corrupting memory.
-
- Feb 11, 2013
-
-
Christoph Hellwig authored
-