- May 29, 2013
-
-
Nadav Har'El authored
Don't abort on an unimplemented sysconf parameter. One of the documented functions of sysconf(3) is to "test ... whether certain options are supported", so programs are free to test for features we don't support yet, and we're supposed to return -1 with errno set to EINVAL. For example, Boost tested _SC_THREAD_SAFE_FUNCTIONS which we didn't support. It would have been fine if we set EINVAL (it would switch from *_r functions to the non-reenatrant ones) - but it wasn't fine that we abort()ed because of this test :-) To be on the safe side, this patch still prints a message if we see an unknown sysconf - in case in the future we'll come across a new one we must treat. But eventually, the message should go away too.
-
Nadav Har'El authored
Implement the _SC_THREAD_SAFE_FUNCTIONS sysconf, returning 1. _SC_THREAD_SAFE_FUNCTIONS is defined in Posix 1003.1c ("posix threads"), and is supposed to return 1 if the thread-safe functions option is supported (*_r() functions). Since we do implement those, we should return 1 for this sysconf. Boost's system library uses this sysconf, and if it sees it is not available, restorts to the _r()-less variants, for no good reason.
-
- May 27, 2013
-
-
Guy Zana authored
the debug() console function is taking a lock before it access the console driver, it does that by acquiring a mutex which may sleep. since we want to be able to debug (and abort) in contexts where it's not possible sleep, such as in page_fault, a lockless debug print method is introduced. previousely to this patch, any abort on page_fault would cause an "endless" recursive abort() loop which hanged the system in a peculiar state.
-
Guy Zana authored
the current code handles the case of recursive aborts incorrectly, while the existing comment is very precise :)
-
- May 22, 2013
-
-
Nadav Har'El authored
abort() did the same thing as the new osv::hang(), so let's just use osv::hang(). Note that it's important that osv::hang() doesn't print anything - abort() does, but avoids infinite recursion that can happen when abort()'s printing itself causes a crash, and another abort().
-
- May 18, 2013
-
-
Avi Kivity authored
musl doesn't provide these defines, and it isn't really necessary to put them in some header.
-
- May 02, 2013
-
-
Avi Kivity authored
-
- Apr 24, 2013
-
-
Avi Kivity authored
-
- Apr 23, 2013
-
-
Nadav Har'El authored
When memory is badly corrupted, our attempt to print "Aborted" in abort() can cause an endless recursion of abort()s, filling the stack and eventually (since we don't have a stack guard) everything. Let's just avoid printing the "Aborted" message if inside an abort().
-
Avi Kivity authored
The current implementation returns 1, leading the JRE to optimize for a uniprocessor host. Unfortunately those optimizations are unsafe on SMP, leading to hangs. Fix by returning the real number of processors.
-
- Apr 11, 2013
-
-
Avi Kivity authored
-
Avi Kivity authored
This is only causing confusion; change all callers to add '\n' explicitly and drop the optional argument.
-
- Apr 07, 2013
-
-
Guy Zana authored
-
- Mar 18, 2013
-
-
Christoph Hellwig authored
just like most libc implementations.
-
- Feb 11, 2013
-
-
Christoph Hellwig authored
-
- Feb 07, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
Of course we don't actually support locales yet, so these are trivial wrappers.
-
Christoph Hellwig authored
-
- Feb 06, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Feb 05, 2013
-
-
Christoph Hellwig authored
-
- Jan 31, 2013
-
-
Avi Kivity authored
Otherwise, static constructors in functions are never called. This manifested itself in the jit generating wrong code when compiling a function, as the register calling convention was not initialized, and the jvm tried to load all method arguments into %rax.
-
- Jan 27, 2013
-
-
Christoph Hellwig authored
-
- Jan 21, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
note that as of now all functioanlity related to file or pthread locking is not implemented or stubbed out.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jan 20, 2013
-
-
Avi Kivity authored
confstr(NULL) is defined to return the size of required storage; use a temporary string to make it not fault.
-
- Jan 19, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jan 18, 2013
-
-
Christoph Hellwig authored
-
- Jan 17, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jan 16, 2013
-
-
Christoph Hellwig authored
Import the whole string library, as well as the ctype functions from the musl C library. Must is a BSD licensed library that aims to be API and mostly ABI compatible with glibc, so it's our easiest way to provide the ABI we need without reinventing the wheel. I will import more of the traditional non-syscall C library code from it and expect libc/ to eventually mostly consist of slightly modified musl code.
-
- Jan 15, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jan 11, 2013
-
-
Christoph Hellwig authored
-
- Jan 10, 2013
-
-
Avi Kivity authored
-
Avi Kivity authored
Do nothing yet (used for CLOEXEC, meaningless for us).
-