- May 07, 2013
-
-
Guy Zana authored
it translate the arguments recieved from javascript, invokes the jni method and return the exit code to javascript
-
Guy Zana authored
expects to recieve a String[] array as an argument, invokes run_elf() and communicates the return value by setting a static int of the invoking class
-
Guy Zana authored
-
Guy Zana authored
other classes may need to read/write global javascript objects, the run command which is going to be commited in the next patch deals with it
-
Guy Zana authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Fix error handling by using the error-safe fileref and fdesc utility classes.
-
Avi Kivity authored
The fdesc keeps a file descriptor safe from leaks, automatically closing it unless the release() method is called (usually when the user is ready to commit state).
-
Avi Kivity authored
This falloc_noinstall() works like the C version, except it either returns a fileref (which automatically maintains reference counts) or throws an exception (which means error handling can be consolidated).
-
Avi Kivity authored
The definitions conflict as soon as someone includes <sys/poll.h>. While this is moving in the opposite direction we want to, this is the minimal fix to get things to build.
-
Avi Kivity authored
-
- May 06, 2013
-
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Similar to thread's wait_until, but manages the wake up list using the condition variable. Because C++ doesn't like templates within 'extern "C"', those lines were moved a bit.
-
Avi Kivity authored
This makes it useful in C++.
-
Avi Kivity authored
Absolute symbolic links refer to the host directory structure, while we want them to refer to the external/ tree. Since we have several trees, we can't just rebase them, so walk down the tree trying to find a match. Fragile and ugly, but seems to work.
-
Nadav Har'El authored
As Avi suggested in his review, let's not have the read-size memory ordering code in the queue implementation - just in the caller if it is needed (and usually, it won't be needed).
-
Avi Kivity authored
Change to the standard .cc, so it picks up the correct flags (and builds silently).
-
Nadav Har'El authored
Fixed bug in the lock-free queue's push() implementation, which was reproduced in the already-committed test. The implementation was based on an incorrect understanding of the C++ compare_exchange operation. Normally, a CAS operation only tries to write to the variable we're trying to write too (in this case, the head of the pushlist). If the previous ("expected") value has already changed, nothing is done. But C++'s compare_exchange, to my complete surprise, when the write failed, copies the new (unexpected) value into the "expected" variable. So I had to fix the push() implementation to assume actual behavior of compare_exchange, not my make-believe one. This commit also includes various other code cleanups.
-
Nadav Har'El authored
Add a much better test for the lock-free multi-producer single-consumer queue implementation, where a 20 threads push numbers onto the queue, and a single consumer reads them and verifies that they all are received and in the right order. This test uncovered a bug which will be fixed by a later commit. The test added here patch was written using C++11's concurrency APIs (std::thread, std::condition_variable, etc.) instead of osv's own APIs, for two reasons: 1. It also helped uncover a bunch of bugs in our pthread and C++11 thread support, so this test can double as another pthread test. 2. It allows running the same test in Linux, to tell if a certain bug is a bug in lockfree:queue_mpsc, or in underlying osv scheduler mechanisms.
-
Nadav Har'El authored
the TLS), which led to preempt_counter not being intialized to zero and therefore preemption not being enabled for new threads. Such non-preemptable threads can monopolize their CPU and cause other threads with the misfortune of being assigned to this CPU to never run. This patch adds a simple test reproducing this bug. Because we don't have an implementation of __tls_get_addr(), we can't "extern" a TLS symbol (here sched::preempt_counter) from the test, and so I had to create a new sched::get_preempt_counter() function which I can "extern" from the test.
-
Avi Kivity authored
Somehow this worked by accident, but we need to zero the .tbss section or random data will be used to initialize it.
-
Avi Kivity authored
Since we're packing the entire file system into the boot image, it has overflowed the 128MB limit that was set for it. Adjust the boot loader during build time to account for the actual loaded size. Fixes wierd corruption during startup.
-
- May 02, 2013
-
-
Nadav Har'El authored
Convert our pthread implementation's condition variables to use the previously committed zero-initializable condition variables. Now PTHREAD_COND_INITIALIZER works as expected, and so do C++11's condition variables.
-
Nadav Har'El authored
Added some basic tests for condition variables. I'm sure more tests can be written but this is a good start. They didn't find any bug, however, so as Avi says, it may mean the test isn't good enough, not there isn't a bug ;-) By the way, I also checked the condition variables in more runs using pthread (not yet committed), and Java (which uses condition variables), and they seem to be working fine.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
When a file incorrectly is used as a directory ("/bin/sh/foo"), namei() detects this and fails, but returns 0 as the error code. Later on open() uses an uninitialized vnode and segaults. Fix by returning ENOENT. Fixes fontconfig segfault when it randomly tries to open files as Mac fonts with resource/data forks.
-
Avi Kivity authored
Following Linux, and not following the manual page.
-
Avi Kivity authored
-
Avi Kivity authored
Needed by fontconfig.
-
Avi Kivity authored
Wanted by fontconfig.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Needed by fontconfig.
-
Avi Kivity authored
fontconfig.so is loaded without a fully qualified path; it expects the search path to be used.
-
Avi Kivity authored
Files without '/' need to be looked up via a search path.
-
Avi Kivity authored
-