It now accepts strings of any size, reduced the stack consumption.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8559 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added comments from storage/NodeMonitor.cpp to the syscalls here (they
will be removed from NodeMonitor.cpp), and adapted them where necessary.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8237 a95241bf-73f2-0310-859d-f6bbb57e9c96
that you can now also look up symbols in there.
load_kernel_add_on() now sets the text section read-only & execute after
having loaded the area - note, it currently doesn't have any effect anyway :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8173 a95241bf-73f2-0310-859d-f6bbb57e9c96
there is no boot device available - this will prevent modules from getting
lost.
Added a comment to open_module_list() about its limitations while booting.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8170 a95241bf-73f2-0310-859d-f6bbb57e9c96
it's not known (it currently only support the current version, of course :-).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7989 a95241bf-73f2-0310-859d-f6bbb57e9c96
Improved returned types.
Added and initializes Disk Device Manager.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7972 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed read/write calls to use and update the descriptor position.
Removed the CHECK_USER_ADDR() macro; it's now using the usual (more readable) check.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7967 a95241bf-73f2-0310-859d-f6bbb57e9c96
Removed KFileDiskDevice functionality for now (since it would have required more changes).
Also disabled actual partition publishing/unpublishing, because this will
be done differently.
This change will temporarily break the DiskDeviceManagerTest build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7914 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed thread_atkernel_exit() to look less broken - the way and when it's
called should still be investigated: NewOS looks a lot cleaner here.
create_thread() now creates the kernel stack upfront, so that it can easily
bail out of that fails. The user stack creation now makes use of B_BASE_ADDRESS
and is therefore a lot better and simpler. In case user stack creation failed,
it should now be able to handle that a lot more gracefully - but that hasn't
been tested yet...
Some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7897 a95241bf-73f2-0310-859d-f6bbb57e9c96
Introduced RESERVED_REGION_ID definition.
Some minor cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7886 a95241bf-73f2-0310-859d-f6bbb57e9c96
stack - it just fails now (since create_area() currently panics when it
fails, this is a cosmetic change anyway :-)).
Now correctly cleans up in case elf_load_user_image() fails.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7883 a95241bf-73f2-0310-859d-f6bbb57e9c96
Replaced "addr" with "addr_t".
Header cleanups.
There is no need to call set_tls_context() in arch_thread_init_tls().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7880 a95241bf-73f2-0310-859d-f6bbb57e9c96
load_kernel_add_on() now protects the text area read-only (theoretically,
as set_area_protection() has not yet been implemented).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7879 a95241bf-73f2-0310-859d-f6bbb57e9c96
and (very) temporary extension, anyway).
- Fixed _user_create_area() - it will now also recognize B_ANY_KERNEL_BLOCK_AREA,
and it will not access a kernel address for B_EXACT_ADDRESS.
- create_area() will now handle B_EXACT_ADDRESS correctly as well.
- get_memory_map() will now silently ignore the missing final entry if the map
contains only one entry.
- The check for user memory was wrong in get_memory_map(); it worked, but it
was not necessarily portable.
- vm_reserve_address_range() was not correctly initializing the region.
- find_and_insert_region_slot() will now search for reserved regions when
B_EXACT_ADDRESS is used - not yet tested, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7871 a95241bf-73f2-0310-859d-f6bbb57e9c96
created a call around find_and_insert_region_slot() that takes care of
everything. Fixed B_BASE_ADDRESS support (it now really works).
First shot at a new VM function vm_reserve_address_range() that will be
used to fix our ELF loader issues (which needs to create adjacent regions
which the VM cannot guaranty at this point).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7870 a95241bf-73f2-0310-859d-f6bbb57e9c96
thread exit - get_death_stack() now returns the interrupt state so that
it can be restored correctly later.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7865 a95241bf-73f2-0310-859d-f6bbb57e9c96
The stack of the main thread is now called "{team name}_main_stack" instead
of primary stack.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7863 a95241bf-73f2-0310-859d-f6bbb57e9c96
correctly when it entered the next recursion of vnode_path_to_vnode().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7854 a95241bf-73f2-0310-859d-f6bbb57e9c96
only).
Userland segments are now called _seg0rw/_seg0ro.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7851 a95241bf-73f2-0310-859d-f6bbb57e9c96
device with BFS - if it succeeds, it will print out the contents of the
volume's root directory.
fs_mount() now makes the mount structure available when mount() from the
FS is called - so that new_vnode() and get_vnode() can work.
fs_mount() did not correctly clean up when something went wrong; it also
didn't notice if the mount's recursive lock couldn't be created.
Some minor debug output improvements.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7845 a95241bf-73f2-0310-859d-f6bbb57e9c96
it's (almost) read only.
Added it to the build - libvm.a is now build as merged object file, since
the cache functions didn't get exported else.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7831 a95241bf-73f2-0310-859d-f6bbb57e9c96
something went wrong) - this would have hidden circular dependencies
as well.
Recursive directory scan was broken, it didn't filter "." and ".." out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7829 a95241bf-73f2-0310-859d-f6bbb57e9c96
lock_memory() and unlock_memory() will now silently fail and return success -
that's only to get things working.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7754 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also made elf_lookup_symbol_address() less restrictive with respect to the
ELF symbol found (it now accepts all types, not only functions).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7714 a95241bf-73f2-0310-859d-f6bbb57e9c96
tested, though.
No longer copies the elf_header in insert_preloaded_image(); it's not used
at runtime (should be superfluous to keep in other kernel images, too).
dump_symbols() now ignores entries with invalid values - don't know exactly
what makes a good entry, but that should look okay.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7713 a95241bf-73f2-0310-859d-f6bbb57e9c96
standard byte order functions in the kernel).
Small cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7705 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed warnings when compiled with TRACE_ELF.
Changed elf_lookup_symbol_address() to returning more useful information.
It now also scans the extended debug symbol table if present - for now, this
only works with preloaded images except the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7701 a95241bf-73f2-0310-859d-f6bbb57e9c96
(in BeOS, all kernel areas are r/w).
If you use B_READ_AREA/B_WRITE_AREA flags, you make the area readable
or even writeable from userland!
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7700 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now uses the extended possibilities of the elf_lookup_symbol_address() call.
Fixed a bug in dbg_stack_trace(); it could crash at the top most stack frame.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7698 a95241bf-73f2-0310-859d-f6bbb57e9c96
to deny further port/sem allocation (and also simplifies port/sem stats).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7570 a95241bf-73f2-0310-859d-f6bbb57e9c96
like any other module (yeeha!).
You can even unload preloaded images later on (to replace them with a
more up-to-date on disk version).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7532 a95241bf-73f2-0310-859d-f6bbb57e9c96
If an image cannot be created out of a preloaded_image, its resources
are freed now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7531 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also renamed elf_load_kspace() to load_kernel_add_on(), and friends.
The new unload_kernel_add_on() now has an image_id as parameter, no longer
a path (like the former elf_unload_kspace()).
Fixed missign file system unload.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7527 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now registers its images as it should do (so you can use commands like
listimage in userland).
Added new debugger command "image".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7522 a95241bf-73f2-0310-859d-f6bbb57e9c96
to acquire the team spinlock).
Renamed the user syscalls to the new style.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7521 a95241bf-73f2-0310-859d-f6bbb57e9c96
freed in the wrong order in case of an error (could have crashed the kernel).
Implemented insert_preloaded_images() which prepares the preloaded images
for later use in the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7520 a95241bf-73f2-0310-859d-f6bbb57e9c96
the size of the stat structure to allow extensions of that structure.
Renamed those syscalls to the new naming scheme.
Updated the syscalls to support stat extensions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7494 a95241bf-73f2-0310-859d-f6bbb57e9c96
probably be available as public kernel API as well (or rather, only).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7492 a95241bf-73f2-0310-859d-f6bbb57e9c96
in device_manager.h).
Fixed some comments.
Removed realpath() from probe.c for now - mechanism will be changed, and that
prevented it from being built as part of the kernel; it's currently not functional.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7489 a95241bf-73f2-0310-859d-f6bbb57e9c96
be any size, not just full path names (even without the file name...). Optimized
it to only traverse paths that match the prefix.
The built-in modules now honor the prefix as well.
Renamed module_iterator::path_stack to stack.
The system add-on path was even wrong (but that didn't matter yet, as we're
still do a recursive search for modules).
The user add-on path now matches the real one - but that should probably be
retrieved from calling find_directory(), anyway...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7483 a95241bf-73f2-0310-859d-f6bbb57e9c96
The prefix will obviously ignored currently!
Fixed get_next_loaded_module_name(); it will now work correctly (doesn't check, though,
if the module is currently loaded...).
Removed the module_test() function - doesn't belong here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7465 a95241bf-73f2-0310-859d-f6bbb57e9c96
main, not by getting the module any longer.
It now also creates the root node directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7438 a95241bf-73f2-0310-859d-f6bbb57e9c96
team_create_team() now uses the B_NORMAL_PRIORITY constant instead of the number directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7425 a95241bf-73f2-0310-859d-f6bbb57e9c96
system - it's now mounted a bit later.
Renamed vfs_register_filesystem() to vfs_register_file_system().
Changed return codes to status_t where appropriate.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7424 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added all of them - module_loader.c and boot_hack.c won't be needed anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7351 a95241bf-73f2-0310-859d-f6bbb57e9c96
Nothing is tested right now, and it's not yet complete, but it's changed so that
it does compile in our tree (and looks a bit more like the other files, too).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7345 a95241bf-73f2-0310-859d-f6bbb57e9c96
Removed all old NewOS error codes.
Cleaned up the includes a bit.
Now prints out a list of preloaded images.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7331 a95241bf-73f2-0310-859d-f6bbb57e9c96
Implemented the possibility for built-in modules - they have to be listed
in sBuiltInModules in module.c to be registered automatically.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7318 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added system_info.c to the build.
Added stats support functions to sems & ports.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7290 a95241bf-73f2-0310-859d-f6bbb57e9c96
The syscall is not yet connected, and the code has not yet been tested.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7179 a95241bf-73f2-0310-859d-f6bbb57e9c96
Incorporated NewOS change 1930: sends the parent SIGCHLD if the team
goes away.
create_thread() now returns B_BAD_TEAM_ID when the team is in death state
instead of ERR_TASK_PROC_DELETED.
Cleaned headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6997 a95241bf-73f2-0310-859d-f6bbb57e9c96
from thread_exit().
Removed team_remove_team_from_hash() as it's no longer necessary.
Also incorporated NewOS change 1930: maintain the parent/children lists.
Cleaned up the headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6996 a95241bf-73f2-0310-859d-f6bbb57e9c96
as already suggested in my earlier comment.
Added some comments.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6993 a95241bf-73f2-0310-859d-f6bbb57e9c96
Took the chance and cleaned it up even more; this change is not a functional change.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6972 a95241bf-73f2-0310-859d-f6bbb57e9c96
using user_memcpy(); therefore it can now fail.
Taken from NewOS, thanks to Travis for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6971 a95241bf-73f2-0310-859d-f6bbb57e9c96
Saved the port_entry.closed member and now set the capacity to 0, since
it is not used any longer (reduces the size of the port table).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6956 a95241bf-73f2-0310-859d-f6bbb57e9c96
could be changed at startup (adapted to system properties).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6955 a95241bf-73f2-0310-859d-f6bbb57e9c96
Right now, it allocates/frees the msgs from the kernel heap for every
message sent - that might be too slow for real world usage.
Also removed all known race conditions from the code.
Not tested at all yet, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6953 a95241bf-73f2-0310-859d-f6bbb57e9c96
did in ports.c), thanks to Jack Burton for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6932 a95241bf-73f2-0310-859d-f6bbb57e9c96
its semaphores get deleted, thanks to Jack Burton for reporting.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6904 a95241bf-73f2-0310-859d-f6bbb57e9c96
the info from the wrong end of the queue.
find_port() did not return the correct error codes.
write_port_etc() checked incorrectly for a deleted semaphore.
B_WOULD_BLOCK would let various functions print out a warning for no reason
(the comments in the code actually didn't fit to the implementation).
"total_count" was counting the number of messages written, not those that
have been read (as the BeBook says).
Thanks to Bill Hayden who reported a lot of these.
Added TRACE macro and moved some of the dprintf()s to that.
Added/fixed some comments.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6901 a95241bf-73f2-0310-859d-f6bbb57e9c96
run. Also create_port() now changes the port ID only when the port lock is
grabbed, so that we don't need to acquire the port list lock in find_port().
Removed setting lock to "0" in create_port() because if it's not 0 in the
first place, there is something seriously wrong (should add an assert there).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6897 a95241bf-73f2-0310-859d-f6bbb57e9c96
I don't know which part of me has written the previous version, but
it seems not have been supervised by a brain while doing it.
The read requests are now maintained per inode (as it has to be),
and there is one read lock per request.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6891 a95241bf-73f2-0310-859d-f6bbb57e9c96
Moved wait_for_team() into the exported kernel API region.
Added missing call for _user_get_current_team().
Made the team_kill_team() call to the BeOS compatible kill_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6868 a95241bf-73f2-0310-859d-f6bbb57e9c96
else is not found here. The BeOS kernel also exports these two *_etc()
functions, and we might want to do that, too.
{receive|send}_data() are now interruptible from userland, but not when
called from the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6700 a95241bf-73f2-0310-859d-f6bbb57e9c96
Copied over the function description of user_strlcpy() from x86/arch_cpu.h
to this file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6697 a95241bf-73f2-0310-859d-f6bbb57e9c96
Implemented the B_CURRENT_TEAM mechanism for _get_next_sem_info().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6691 a95241bf-73f2-0310-859d-f6bbb57e9c96
out the port_info setup to fill_port_info(), implemented the B_CURRENT_TEAM
behaviour as described in the BeBook (well, almost, since B_CURRENT_TEAM
is not defined in R5, it's just "0"), improved error checking.
Cleaned up user syscalls.
Replaced SYS_MAX_OS_NAME_LEN with B_OS_NAME_LENGTH.
Banned strncpy().
Added our license.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6687 a95241bf-73f2-0310-859d-f6bbb57e9c96
with B_OS_NAME_LENGTH, make use of the IS_USER_ADDRESS() macro, etc.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6685 a95241bf-73f2-0310-859d-f6bbb57e9c96
Cleaned up _get_thread_info() & _get_next_thread_info() - factored out
the thread_info setup into fill_thread_info().
Is now using team_is_alive() instead of team_get_team_struct().
Replaced SYS_MAX_OS_NAME_LEN with B_OS_NAME_LENGTH.
Banned strncpy() in favor for strlcpy().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6683 a95241bf-73f2-0310-859d-f6bbb57e9c96
Replaced some old error codes.
Explained a bit more how to solve a race condition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6681 a95241bf-73f2-0310-859d-f6bbb57e9c96
Removed old error codes.
Replaced the DEVFS_IOCTL_* with their Be equivalents. Note, the related
functions are not user space safe yet. But since the devfs will be
almost rewritten, there is no point in changing it now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6679 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added our license to the updated source files.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6672 a95241bf-73f2-0310-859d-f6bbb57e9c96
of the one that issues the alarm - it now does an ugly cast to get the
real thread structure. It would be nice if we had an additional user
parameter to a timer event.
Thanks to Travis for reporting this one!
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6310 a95241bf-73f2-0310-859d-f6bbb57e9c96
{get|put}_physical_page_tmap() directly.
Also replaced all occurrences of "addr" with "addr_t".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5938 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Wrapped everything but #includes in #if _KERNEL_MODE to keep from
redeclaring/definining operator new and nothrow in userland.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5921 a95241bf-73f2-0310-859d-f6bbb57e9c96
is now honoured: the shortcut is now only made if it's okay to do it. Added
a comment what we could do to further improve performance.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5788 a95241bf-73f2-0310-859d-f6bbb57e9c96
forgotten about different address spaces with direct (unbuffered) pipe transfer,
shame on me.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5786 a95241bf-73f2-0310-859d-f6bbb57e9c96
always zeroed anyway.
cmd_help() is now able to print out help about the specified command
only - it will also print out all aliases of that command. Reduced
the distance between the command name and its description; NULL
descriptions are now also allowed.
There is now a find_command() function that's used throughout the
module. Like in the Be debugger, it will now also accept partial
matches, i.e. "co" will most probably match "continue" (as long as
there is no new "co*" command added by another component). It will
first try to find an exact match, and only if that failed it will
search for a partial match.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5307 a95241bf-73f2-0310-859d-f6bbb57e9c96
Disabled dbg_get_serial_debug(); it's only used temporarily in the keyboard
device (and I removed its usage there, too).
Added "continue", "exit", and "es" commands as in the Be kernel debugger
(they will all exit the debugger and try to continue normal kernel execution).
Reordered the sources so that public kernel API is together.
Added a _user_debug_output() syscall (not yet activated) which dumps to the
kernel's serial output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5305 a95241bf-73f2-0310-859d-f6bbb57e9c96
it might even be correct, but we also might want to have this stuff somewhere
else (libroot).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5279 a95241bf-73f2-0310-859d-f6bbb57e9c96
for the standard boot process).
Removed the STREAM_TYPE_* definitions, it's now using the stat definitions
instead.
Cleaned the source a bit.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5188 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Converted all uses of B_{FILE,OS}_NAME_LENGTH in ddm_userland_interface.cpp
to appropriate ddm constants.
- Made module names B_PATH_NAME_LENGTH long.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5181 a95241bf-73f2-0310-859d-f6bbb57e9c96
a few partition name constants that hadn't been changed from B_OS_NAME_LENGTH.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5179 a95241bf-73f2-0310-859d-f6bbb57e9c96
- For functions where name strings are both input and output parameters that
may be truncated if too long, updated copy-in procedure to allow truncation
without returning an error.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5155 a95241bf-73f2-0310-859d-f6bbb57e9c96
to user_strlcpy()
- Changed all remaining instances of SYS_MAX_PATH_LEN
to B_PATH_NAME_LENGTH.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5152 a95241bf-73f2-0310-859d-f6bbb57e9c96
set_real_time_clock().
I am not sure if this call is supposed to set the hardware clock.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5145 a95241bf-73f2-0310-859d-f6bbb57e9c96
need the same RTC code as x86 (but using the ISA bus manager instead of
in/out).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5143 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added a comment about how to make computing the seconds passed since 1/1/1970
more efficient.
Some slight other changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5142 a95241bf-73f2-0310-859d-f6bbb57e9c96
Commented the debug welcome message in rtc_init().
Moved the seconds per year calculation into a separate function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5140 a95241bf-73f2-0310-859d-f6bbb57e9c96
a pointer to the file system.
Renamed all static g* variables to s*.
Renamed "mount_id" fields to the higher level "device" (to be able
to compile the file).
Fixed all casting warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5077 a95241bf-73f2-0310-859d-f6bbb57e9c96
different arch-specific CPU functions. Fixed some bugs. Not tested.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5069 a95241bf-73f2-0310-859d-f6bbb57e9c96
normal circumstances, though).
Updated the comment why we have to create the read-only segment as read-write.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5055 a95241bf-73f2-0310-859d-f6bbb57e9c96
respective setter/getter methods to the KPartition class.
If a partition is mounted, the field will contain the cookie the
FS's mount() hook passed back to the VFS. This way the FS has
access to its internal data structures. We need the cooperation
of the VFS to get the cookie.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4776 a95241bf-73f2-0310-859d-f6bbb57e9c96
on disk to match to be able to find it, changed the ToDo: comment in the
affected function, and added a test call to vfs_get_module_name(); our
bootfs cannot handle the path depth/length required to be a useful module
host, so we still have our recursive search algorithm in place for now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4560 a95241bf-73f2-0310-859d-f6bbb57e9c96
of a given module name.
vnode_path_to_vnode() can now return the type of the file, changed the parameter
order.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4559 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added a comment about how to traverse the module path to find a given module -
could well be that we got that wrong (too loose, it will work perfectly, though,
just slower than it could be).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4516 a95241bf-73f2-0310-859d-f6bbb57e9c96
"sudden unmounts" (as far as that can work). This replaces the weak
find_mount() call used at several places in the fs index functions.
Fixed a bunch of warnings, mostly unused prototypes and variables.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4491 a95241bf-73f2-0310-859d-f6bbb57e9c96
#ifdef'd a variable that's only of use with TRACE() on.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4490 a95241bf-73f2-0310-859d-f6bbb57e9c96
easier to check if the partitioning_system returns the correct size :-)).
Uses %f which doesn't work in the BeOS kernel (but might in OpenBeOS).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4445 a95241bf-73f2-0310-859d-f6bbb57e9c96
renamed user_??? functions into the new _user_??? naming style.
changed implementation of PPC 64 bit atomic functions to use (un)lock_memory()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4417 a95241bf-73f2-0310-859d-f6bbb57e9c96
They are only used if the architecture doesn't support them directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4360 a95241bf-73f2-0310-859d-f6bbb57e9c96
Reordered the syscalls a bit (in functional groups), not completely, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4354 a95241bf-73f2-0310-859d-f6bbb57e9c96
The lock_memory()/unlock_memory() functions cannot be implemented right
now, as the NewOS VM doesn't support locking.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4346 a95241bf-73f2-0310-859d-f6bbb57e9c96
TRACE() macro. Renamed the old TRACE macro to TRACEPFAULT.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4343 a95241bf-73f2-0310-859d-f6bbb57e9c96
ATOMIC_FUNCS_ARE_SYSCALLS is only defined on architecture like SH4.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4341 a95241bf-73f2-0310-859d-f6bbb57e9c96
kernel_os_arch_x86.o file that is genereated by libroot.
Removed duplicate implementations from this file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4337 a95241bf-73f2-0310-859d-f6bbb57e9c96
Made the "name" argument const for create_area_etc() and vm_map_physical_memory().
Moved some common conversion code (BeOS to NewOS VM constants) to separate
functions to clean them up a bit.
create_area() now automatically sets LOCK_KERNEL if the area is to be created
in kernel space (as I would guess BeOS does, too).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4331 a95241bf-73f2-0310-859d-f6bbb57e9c96
architecture can do this better. Removed from generic cpu.c file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4330 a95241bf-73f2-0310-859d-f6bbb57e9c96
Temporarily #if'd out scan_pci() and removed the compiler calming hack for it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4324 a95241bf-73f2-0310-859d-f6bbb57e9c96
in the kernel.
Use the new delete_area_etc() call for other needs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4321 a95241bf-73f2-0310-859d-f6bbb57e9c96
delete_area() now only allows to delete areas you have created
yourself before from userland, again.
The kernel's delete_area() still allows everything, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4320 a95241bf-73f2-0310-859d-f6bbb57e9c96
delete. Added a comment how the security should be improved by adding another
restriction.
Also mentioned that it's probably a bad idea that vm_delete_region() will
not wait until the region has been freed, but just "mark" it as to be freed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4319 a95241bf-73f2-0310-859d-f6bbb57e9c96
that will call the internal vm_*() calls. This will make it easier to just
drop in another VM.
Also (partially - Ingo was faster) introduced the new syscall naming scheme
_kern_ & _user_ prefixes to them into the system namespace, and no longer
clobber the application namespace.
Removed the now unused user_vm_create_anonymous_region() call.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4311 a95241bf-73f2-0310-859d-f6bbb57e9c96
to work at all: recurse_directory() always returned failure, no matter what opendir()
returned (one semicolon too much), create_module() allocated only 4 bytes for
the module - sizeof(module) referred to the variable, not the structure name...
(the unfortunate consequences of the naming scheme I otherwise like very much -
it "just" took me 3 hours to hunt both bugs down).
Added some TRACE() and ASSERT()s.
Added a new debugger command "modules".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4300 a95241bf-73f2-0310-859d-f6bbb57e9c96
(except for the first 4 bytes, because that's the pointer to the next buffer
in the free list).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4299 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added {Add,Clear}Flags() which are more comfortable than SetFlags() in
most cases.
* On construction the `busy' and `descendant busy' flags are set.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4220 a95241bf-73f2-0310-859d-f6bbb57e9c96
generates the jobs needed to transform the former to the state of the
latter. Currently only the jobs for deleting partitions and resizing
and moving existing ones are generated. Resizing and moving was the
hard part, though, the rest should be much easier. Completely untested
yet.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4170 a95241bf-73f2-0310-859d-f6bbb57e9c96
now no longer set in the loop, the total_length calculation should now be correct.
The CBUF_FLAG_CHAIN_TAIL is now set for the lastBuffer instead of buffer.
Removed some superfluous lines in cbuf_get_ptr(), and cbuf_ones_cksum16().
Fixed the buffer->length calculation in cbuf_truncate_tail() and added some
comments about the correctness of the code - should be investigated and fixed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4083 a95241bf-73f2-0310-859d-f6bbb57e9c96
to the module interfaces. So the disk system will be informed, when a
shadow partition has changed and it is allowed to do necessary
adjustions (e.g. adjusting the cookie, the parameters, or on
partitioning system initialization even creating special child
partitions (apple partitioning system)).
* Added `int32 *index' parameter to ValidateCreateChild(). So the
partitioning system can report at which index the new child shall be
inserted.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4065 a95241bf-73f2-0310-859d-f6bbb57e9c96
modification functions. Don't know why I didn't right from the start.
* Implemented _kern_resize_partition().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4045 a95241bf-73f2-0310-859d-f6bbb57e9c96
PrettyName() of the responsible disk system.
* Added change counter support and changes tracking.
* Added UninitializeContents().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4042 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Removed the disk_system_id parameter where superfluous.
* Got rid of the `child' variants of the _kern_{supports,validate}_*()
syscalls for moving and resizing. Reimplemented the real ones to do the
the right thing, i.e. they check all concerned disk systems now.
* Added _kern_supports_setting[_content]_parameters().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4020 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed handling of the deletion (removal) of shadow partitions. Formerly
the shadow partition corresponding to the disk device wasn't removed
properly.
* Added a shadow_id field to the user_partition_data structure which
contains the ID of the shadow partition, if it is one. The id field
will hold the ID of the physical partition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3974 a95241bf-73f2-0310-859d-f6bbb57e9c96
matches the name of the header much better. :-)
* Implemented the syscalls for iterating through and finding disk systems.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3902 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Writing disk device/partition data into userland buffer added.
* Migration of some definitions into <DiskDeviceDefs.h> header.
* Small bug fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3882 a95241bf-73f2-0310-859d-f6bbb57e9c96
and KShadowPartition from it. KPhysicalPartition represents a partition
that exists on-disk, while KShadowPartition is a partition edited by the
API user, but not yet written to disk. Related changes in other classes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3851 a95241bf-73f2-0310-859d-f6bbb57e9c96
a chained buffer provided by cbuf.
Only select support is missing now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3736 a95241bf-73f2-0310-859d-f6bbb57e9c96
now working, but everything that would have to be temporarily buffered
is discarded right now (will use cbufs for this).
Pipes can now actually be created and removed - this didn't work before.
Changed some lock types to better suit their needs.
Small fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3708 a95241bf-73f2-0310-859d-f6bbb57e9c96
Renamed cbuf_get_len() to cbuf_get_length().
Fixed a bug in cbuf_get_length() that would have returned an error code in
a size_t (now returns 0 in that case).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3692 a95241bf-73f2-0310-859d-f6bbb57e9c96
(creation, deletion), no reading/writing allowed (or even started),
no select support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3683 a95241bf-73f2-0310-859d-f6bbb57e9c96
*not* change the previous behaviour (well, I added some debug output), since
the former recursive_lock_create() did always return B_OK, no matter if the
lock could be initialized or not.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3680 a95241bf-73f2-0310-859d-f6bbb57e9c96
and b) doesn't compile due to the latest lock changes (see lock.c 1.7).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3678 a95241bf-73f2-0310-859d-f6bbb57e9c96
recursive_lock_create()) - this reveals bugs in other parts of the system (VM),
but those won't be fixed for now (because of VM2).
Added the possibility of giving a recursive lock a name.
Moved the functions for benaphores and rw-locks to this file (they were
part of the lock.h header as defines).
Removed unused headers.
Small cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3677 a95241bf-73f2-0310-859d-f6bbb57e9c96
kept.
* Fixed find_{disk_device,partition}().
* Implemented delete_partition(). The device/partition management functions
should now be complete.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3654 a95241bf-73f2-0310-859d-f6bbb57e9c96
management regarding removal and deletion of objects.
* Fixed the file disk system related stuff. KFileDiskSystem now uses the
virtualdrive driver. The former method was seemed simple and brilliant,
but the B_SET_PARTITION ioctl wouldn't work.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3650 a95241bf-73f2-0310-859d-f6bbb57e9c96
files as disk devices. This will not only be great for testing the
file and partitioning system modules' writing capabilities, it will also
just be a nice feature to have.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3598 a95241bf-73f2-0310-859d-f6bbb57e9c96
KPartition and as no-ops in KDiskDevice.
* Prefixed partition names with "obos_" to not interfere with R5's
partition names.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3509 a95241bf-73f2-0310-859d-f6bbb57e9c96
Some changes to KPartition, KDiskDevice, KDiskSystem on this way.
Still missing is KPartition::Publish() and its invocation in
KDiskDeviceManager. Then everything should be in place to start with
porting the scanning parts of our disk system modules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3486 a95241bf-73f2-0310-859d-f6bbb57e9c96
the fs register correctly - not that it should have much effect since it's
rarely used anyway (no reason to might be wrong, though) :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3483 a95241bf-73f2-0310-859d-f6bbb57e9c96
since they are implemented in the libroot's os/arch directory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3235 a95241bf-73f2-0310-859d-f6bbb57e9c96
it build again; it doesn't work yet at all (pretty similar to NewOS change 1772).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3161 a95241bf-73f2-0310-859d-f6bbb57e9c96
implementing a more efficient on_exit_thread().
Note, this extra parameter is currently only used for user space code,
not yet in the kernel; thus on_exit_thread() is not available in the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3075 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added TRACE_SMP and a TRACE() macro that is used instead of dprintf() directly.
Also fixed all warnings with TRACE_SMP set to 1.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2941 a95241bf-73f2-0310-859d-f6bbb57e9c96
changed the field order in a couple of structs back to their previous ordering
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2856 a95241bf-73f2-0310-859d-f6bbb57e9c96
normally, I wouldn't checkin a file with cosmetic changes only
however, Marcus just made a change on this file earlier today,
so the file would have to be rebuilt anyway -- might as well
make it pretty too!
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2853 a95241bf-73f2-0310-859d-f6bbb57e9c96
but doesn't have to be read from disk for efficiency reasons.
Fixed a bug in get_vnode() in case of fs->get_vnode() returns an error of some
kind.
fs_mount() no longer hides the return code from the fs->mount() function anymore (for now).
Added some comments and ToDo items.
Changed some return error values to the B_xxx style (will probably need to define
some new error codes for OpenBeOS).
Changed some return types to status_t/void where appropriate.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2786 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed apic_read()/apic_write() to accept offsets not addresses as register
parameter.
Cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2605 a95241bf-73f2-0310-859d-f6bbb57e9c96
thread code now properly traces time spent in user vs kernel mode. The code was
just plain broken before
http://www.newos.org/cgi-bin/perfbrowse.perl?@describe+1704
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2599 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added a SIGNAL_TO_MASK() macro.
Removed the useless disable_interrupts() call in set_alarm().
More cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2584 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now directly exports (as is, most of) the kernel thread API.
Now has user_*() functions where needed.
Moved thread_set_priority() from scheduler.c to set_thread_priority().
Renamed thread_wait_on_thread() to wait_for_thread().
user_get_thread_info() now uses user_strlcpy() instead of user_strncpy().
Fixed the snooze() implementation - it now returns B_OK where appropriate. Now all snooze()
calls will call snooze_etc().
New private call spawn_kernel_thread_etc() to replace thread_create_kernel_thread_etc().
Moved some functions around.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2578 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed a bug in sigaction(): it would have crashed with act/oact == NULL (which
is perfectly legal).
Now directly exports the kernel API.
Now has user_*() calls where needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2577 a95241bf-73f2-0310-859d-f6bbb57e9c96
Renamed team_wait_on_team() to wait_for_team() (more BeOS-alike).
Adapted to other changes (new thread functions).
Cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2576 a95241bf-73f2-0310-859d-f6bbb57e9c96
and don't have any functionality at this place.
Added new syscall for set_thread_priority().
Some other changes due to cleanup.
Fixed userland snooze() call.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2575 a95241bf-73f2-0310-859d-f6bbb57e9c96
have the scheduler_ prefix instead of thread_.
Moved thread_set_priority() back to thread.c where it belongs to.
Added new function to remove a thread from the run queue.
Renamed run_q to gRunQueue.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2572 a95241bf-73f2-0310-859d-f6bbb57e9c96
Actually never unlocked the daemon's lock (always called mutex_lock() instead
of mutex_unlock()...).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2568 a95241bf-73f2-0310-859d-f6bbb57e9c96
the vnodes of a mount structure).
Removed stubs for send_notification() and notify_listener() (they are now located
in message.c and node_monitor.c).
Added support for the node monitoring service.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2482 a95241bf-73f2-0310-859d-f6bbb57e9c96
unmounts is not yet implemented.
Added an empty implementation for send_notification() - the function that is
(or will be) able to send out BMessages from within the kernel; currently
just prints out what should be done.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2481 a95241bf-73f2-0310-859d-f6bbb57e9c96
Adapted because of changing structure names (struct uspace_program_args).
Added comments, fill_team_info() now sets the team_info.image_count correctly.
Some cleanups and style changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2426 a95241bf-73f2-0310-859d-f6bbb57e9c96
arch_cpu: could have used the TLS_SIZE macro in one place, removed
a now unused variable, assignments to tss_loaded are now booleans.
thread.c: added the new fields to _dump_thread_info().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2393 a95241bf-73f2-0310-859d-f6bbb57e9c96
from the USER_STACK_REGION (until B_BASE_ADDRESS is available), made it much better
readable. It now grows from the lower USER_STACK_REGION up to the start of the main
thread's stack location.
Calls arch_thread_tls_init() and accounts for the TLS area in the stack region.
Added some comments, some cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2382 a95241bf-73f2-0310-859d-f6bbb57e9c96