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