- Oct 16, 2013
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Ignoring EPOLLET will generate more wakeups, but should work with most applications. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Large partitions set head=254, not 255. Also be more accurate calculating the exact point of overflow.
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
More realistic. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
It's a superset of epoll_create(), so implement the latter in terms of the former. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Needed by boost.asio. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
std::streambuf<char> is defined as an "extern template", which means it is instantiated in the library, not at the point-of-use, in order to reduce object size and compilation time. One of its member functions, std::basic_streambuf::seekpos(...) has a parameter whose type depends on mbstate_t; this embeds the type name into the mangled function name. On Linux, mbstate_t is a typedef for __mbstate_t, so the latter type name is embedded into the mangled function name. On osv, there is no such typedef, so mbstate_t is embedded. This causes lookup to fail when loading a shared object that uses streambufs. Fix by defining mbstate_t in the same way as glibc. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
optind is a global variable that is expected to be zero-initialized by getopt(). Running one object after another violates this, if both use getopt(). Fix by saving the value of optind across calls. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Oct 15, 2013
-
-
Tomasz Grabiec authored
The 'define' form with '=' was introduced in GNU Make 3.82 and has the same meaning as without. The default 'make' in Ubuntu 13.04 is stil on 3.81. Let's drop '=' for better compatibility. Symptoms: make[1]: Entering directory `~/src/osv/build/release' CC bsd/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.o ../../bsd/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c:28:21:\ fatal error: solaris.h: No such file or directory #include <solaris.h> ^ compilation terminated. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
Avi Kivity authored
Much easier than constructing a traditional argc/argv. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Unlike tls for the main module, which simply offsets fs:0, shared object use an indirection scheme since each module gets its own tls base address, which needs to be found (and initialized) via __get_tls_addr() Implement __get_tls_addr() and the associated relocation and storage management. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Currently we search the entire vma list while looking for a range. This is less than optimal. Define a vma::addr_compare function object that can be used as comparator with boost::rbtree::equal_range(), and use that to search for both bounds simultaneously. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
Tomasz Grabiec authored
Related changes previously made in java/build.xml were reverted and moved to java/runjava/build.xml Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
Tomasz Grabiec authored
The system classloader should have classes which were specified in the command line using -cp/-classpath/-jar. Before this change only runjava.jar was included. System class loader is queried explicitly by java.util.logging framework to lookup classes configred in logging properties file. To solve this problem a custom system classloader is set when starting JVM. It delegates to the application classloader created when java program was started. It also handles the case when a new java application is started within the same JVM. Such application should have its own view of system classes. However we are able to install only one system classloader per JVm. To solve this we start each java application in a separate thread and use InheritableThreadLocal to hold the application class loader which should be used as system class loader view for the thread family. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
Tomasz Grabiec authored
Building with ant requires no changes in the build scripts when new classes are added. It is a standrd tool to build java programs. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
- Oct 14, 2013
-
-
Nadav Har'El authored
Add a convenience function, osv::run(), to run an ELF executable. The patch includes extensive Doxygen documentation for the new function, also detailing the how osv::run() differs from the familiar Linux functions like exec(2). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Pekka Enberg authored
Fix mincore() to follow Linux ABI and return ENOMEM only if (part of the) memory range is unmapped even if it's not resident. This is needed for mincore() to work with demand paged mmaps. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Fixes the following compilation error: ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c: In function ‘rw_enter’: ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c:205:3: error: pointer targets in passing argument 1 of ‘atomic_add_int’ differ in signedness [-Werror=pointer-sign] atomic_add_int(&rwlp->rw_count, 1); ^ In file included from ../../bsd/sys/cddl/compat/opensolaris/sys/atomic.h:33:0, from ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:66, from ../../bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h:31, from ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c:32: ../../bsd/machine/atomic.h:285:1: note: expected ‘volatile u_int *’ but argument is of type ‘int *’ ATOMIC_ASM(add, int, "addl %1,%0", "ir", v); ^ Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Fixes the following build breakage: CC bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.o ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c: In function ‘cv_timedwait’: ../../bsd/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c:322:2: error: implicit declaration of function ‘gettimeofday’ [-Werror=implicit-function-declaration] if (gettimeofday(&tv, NULL) != 0) ^ cc1: all warnings being treated as errors Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
I forgot to commit the change to dlfcn.cc in the previous patch. Sorry... Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
This is patch v2, incorporating most of the comments from the previous round. Solves issue #47: elf::program's API - add_object() and remove_object() was problematic in two respects: 1. It did not do reference-counting on the loaded object, so if add_object() was done 5 times, a single remove_object() would unmap the object and its 4 other users will crash. 2. It is un-C++-like. This patch replaces these two functions by a single function get_library(): std::shared_ptr<elf::object> get_library(std::string lib, std::vector<std::string> extra_path = {}); get_library() returns a shared_ptr, which is reference counting and does proper C++-style RAII. For example in the code: auto lib = elf::get_program()->get_library(path); auto main = lib->lookup<int (int, char**)>("main"); int rc = main(argc, argv); once lib out of scope, the reference count of the elf::object automatically goes down, and if nobody else holds another shared-pointer to the same library, the object is destroyed (causing the shared library to be unloaded). This patch also documents, with Doxygen, all the functions it touches. IMPORTANT NOTE: This reference count is completely unrelated to the issue of concurrent use of dlopen()/dlclose()/dl_iterate_phdr(), which is still buggy and we need to fix (I have a patch for that, but it's too long to fit in the margin). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Avi Kivity authored
More mkfs infrastructure. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
root mounts accept both a device and a pool name, while non-root mounts only accept the pool name (the device(s) already known while mounting the pool during the root mount). Adjust the mount protocol for this. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
A zpool has a zfs as its userspace interface; but the call to create it was disabled as part of the porting effort. Re-enable it so osv can create zpools. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
To build is_whole_disk() we need to pull in a lot of partition code. Ignore it instead. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
MNTTAB points at /dev/zero, which doesn't exist, and is too long anyway. Point it at the correct place. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-