- May 06, 2013
-
-
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
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
We have a class file, and a wrapping struct file, and they conflict. Rename 'class file'. Long term it should disappear.
-
Avi Kivity authored
This allows inserting tracepoints.
-
Avi Kivity authored
Not sure we want it, but for now, it makes the resolver stuff work.
-
Avi Kivity authored
Our hostname is now "osv.local".
-
Avi Kivity authored
Used by the JVM, apparently in libawt.so startup.
-
- May 01, 2013
-
-
Guy Zana authored
-
Guy Zana authored
we unintentionally ran over the file structure by providing it as an argument to be written to.
-
Guy Zana authored
to describe their purpose better.
-
Guy Zana authored
-
Guy Zana authored
-
Nadav Har'El authored
Previously we had two different mutex types - "mutex_t" defined by <osv/mutex.h> for use in C code, and "mutex" defined by <mutex.hh> for use in C++ code. This is difference is unnecessary, and causes a mess for functions that need to accept either type, so they work for both C++ and C code (e.g., consider condvar_wait()). So after this commit, we have just one include file, <osv/mutex.h> which works both in C and C++ code. This results in the same type and same functions being defined, plus some additional conveniences when in C++, such as method variants of the functions (e.g., m.lock() in addition to mutex_lock(m)), and the "with_lock" function. The mutex type is now called either "mutex_t" or "struct mutex" in C code, or can also be called just "mutex" in C++ code (all three names refer to an identical type - there's no longer a different mutex_t and mutex type). This commit also modifies all the includers of <mutex.hh> to use <osv/mutex.h>, and fixes a few miscelleneous compilation issues that were discovered in the process.
-
Avi Kivity authored
Add C string support to tracepoints.
-
Avi Kivity authored
Command lines such as -e '--trace=tp*' will try to do shell wildcard expansion, which is unwanted here.
-
Avi Kivity authored
-
Avi Kivity authored
Encode a C string by copying its value to the buffer, instead of just storing the pointer as we do for pointers to other types. Only the first 49 characters are stored. The buffer size is static, but this limitation can be lifted later.
-
Avi Kivity authored
This will allow us to specialize it for some types, later.
-
Avi Kivity authored
The restriction protects nothing, remove it.
-
Avi Kivity authored
The command line syntax (--trace=wildcard) fails for tracepoints loaded after the command line is parsed (for example in shared libraries). Fix by keeping the wildcards in a list, and applying it to each tracepoint as it is constructed.
-
Nadav Har'El authored
Added a new condition variable implementation. The header file is <osv/condvar.h>, and it is usable both from C code and C++ code - in C++ code you will get some additional conveniences (like using methods instead of global functions). The condition variable type is "condvar_t" or "struct condvar" from C, or just "condvar" from C++. Besides working in C, this implementation has two additional benefits over the previous one (still in pthread.cc, will be removed in a followup patch): 1. The condvar instance can be zero-initialized, and doesn't need special initialization or finalization functions. 2. convar does not allocate any memory - the wait records that form a wait queue are kept on each waiting thread's stack.
-
- Apr 30, 2013
-
-
Nadav Har'El authored
-