Commit Graph

282 Commits

Author SHA1 Message Date
Axel Dörfler
ac5b2b4ece bootfs_read_dir() and devfs_read_dir() both returned B_ENTRY_NOT_FOUND
instead of B_OK for the last directory entry.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 17:49:28 +00:00
Axel Dörfler
744761bf27 Removed the team->path variable. Renamed ioctx to io_context.
Some cleanups, moved user_*() functions to the end of the file.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 14:17:53 +00:00
Axel Dörfler
1291a19d84 thread->page_faults_allowed is now initialized.
Updated due to the ioctx -> io_context change.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 14:11:35 +00:00
Axel Dörfler
5cdaa5176e Now panics if page faults are forbidden and happen anyway.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 14:10:34 +00:00
Axel Dörfler
52bd3fc17c Implemented forbid_page_faults() and permit_page_faults(), added a new
field to the thread structure to keep track of the current state.
forbids/permits can be nested.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 14:09:43 +00:00
Axel Dörfler
aeb5053982 Added empty (until TLS steps in) function stubs for:
permit_page_faults(), and forbid_page_faults().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 01:50:55 +00:00
beveloper
7d9fdf5918 make sure that the stack page is in place before disabling interrupts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-30 02:36:31 +00:00
beveloper
c0d31b20ab Fixed the detection of page faults that happen while interrupts were
disabled. If a page fault happend while a interrupt handler is executed,
or while a section of code is running with interrupts disabled (with the
exception of the initial kernel startup), the page fault handler will
now panic, to give you the chance to fix the bug.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-30 02:01:29 +00:00
Axel Dörfler
750a82c5d3 Added new debug output macros (TRACE()).
thread_exit() for now prints a warning if it was called with interrupts
disabled.
Fixed a bug in thread_exit2() that restored the interrupts too early,
instead of simply enabling them (and restoring them later) [found by
Marcus O. great debug additions].
Fixes for the khash changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:42:52 +00:00
Axel Dörfler
14d9bcd728 Fixed two warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:39:34 +00:00
Axel Dörfler
3ae9bebe33 Fixes for the khash changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:38:52 +00:00
Axel Dörfler
fc88dc959f Added a missing include (and fixed a warning this way).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:37:19 +00:00
Axel Dörfler
8a91be0446 Removed two warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:36:42 +00:00
Axel Dörfler
8a531eeb0a Fixes for the changes in khash.
Now the d_reclen field of struct dirent is correctly calculated in all
file systems (read_dir() function).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:36:05 +00:00
Axel Dörfler
b9b1c1c4f5 Almost completely rewritten module.c. Locking now works correctly, memory
leak fixed, some other bugs fixed, removed the global queues as there weren't
needed and used at all, moved to the other hash table implementation
(because the new_hash_table stuff was buggy). Should really work okay now :-)

Added the last missing function get_next_loaded_module_name() - I am not
sure the Be version works this way, but we could easily change that after
actually having found out how that one is really working.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:33:57 +00:00
Axel Dörfler
d92e4b19e4 Completely removed the buggy, inflexible, and incomplete new_hash_table
implementation.
Some cleanups of the other code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:30:20 +00:00
beveloper
0010bfc64f the new_hash_table code has a larger number of problems
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 17:34:55 +00:00
beveloper
428f0ce25c last cleanup of pool code before rewriting it
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 15:05:58 +00:00
beveloper
9c2992c73b fixed debug function
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 14:41:06 +00:00
beveloper
9eb6ed8082 disable interrupt check when in a panic() context
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 14:11:08 +00:00
beveloper
3b70f94330 added a magic value to check clobbering of the free list
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 14:10:20 +00:00
beveloper
7991b1a031 added a lot of debugging functions that should help fixing bugs
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 02:25:04 +00:00
beveloper
d8dd74308e Optimized (yes, we shouldn't do it now) to consume less power on P4,
and to have better performance on Hyper Threading systems. Should be
backward compatible with all x86 systems, according to Intel documentation.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-23 17:43:36 +00:00
beveloper
d55c9bd082 moved queue initialization into int_init2()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-19 11:53:41 +00:00
Daniel Reinhold
89feafabe5 fixed call to thread_get_current_thread_id()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-19 06:44:51 +00:00
Daniel Reinhold
690fa06644 restored SYSCALL_GET_CURRENT_THREAD_ID -- my mistake, it was fine as it was
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-19 05:51:13 +00:00
Daniel Reinhold
715f76df9e added sys_get_current_thread_id() -- for libroot compatibility
some minor rearrangement (sys_xxx() calls now placed together)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-18 02:04:57 +00:00
Daniel Reinhold
898852b6b5 fixed SYSCALL_GET_CURRENT_THREAD_ID (was calling a function that had been removed)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-18 02:00:38 +00:00
Daniel Reinhold
42bef465fa added sys_send_signal()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-18 01:58:00 +00:00
Daniel Reinhold
453532db1c moved the string table definition to libroot where it belonged
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-18 00:39:41 +00:00
beveloper
725e25d182 unlock the spinlock
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-17 13:32:05 +00:00
Daniel Reinhold
062dc34181 the signal string table was fixed to contain proper
output strings -- the old debug table is still there,
now renamed 'sigstr[]'

MAX_SIGNO replaces 32 in several spots


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-17 04:49:14 +00:00
Axel Dörfler
cc4445505e Fixed some issues in int.c.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-17 01:59:31 +00:00
Axel Dörfler
d5bb31991f Checked one of Marcus' comments in int.c, and changed the list initialization
to use the newly provided function for this.
module.c now also uses the initque() function, some minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-17 01:38:35 +00:00
beveloper
b795251564 This code seems to have some issues. Please check.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-17 00:52:43 +00:00
beveloper
42acb44c35 added a couple of debugging checks into the spinlock functions
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-17 00:28:32 +00:00
Axel Dörfler
cd3ea5f216 vnode_path_to_vnode() now correctly asks for access permissions when traversing
the directory tree.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-11 12:14:19 +00:00
Axel Dörfler
64d41f033f (Almost) completely rearranged the kernel build; main issues aren't fixed
yet, but the jam problem is gone and some bugs fixed.
We are now using merged objects to bind different functionality together,
which simplified the kernel Jamfile a lot.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-04 19:06:44 +00:00
Axel Dörfler
ed622838f5 Moved the select/poll implementation into its own file (vfs_select.c).
Fixed some minor a larger issues (one memory corruption due to the use of FD_ZERO()).
notify_select_event() is no longer binary compatible (hasn't been used on R5).
Added syscalls for select/poll in the syscall dispatcher.
Fixed some debug output in fd.c, adapted for the new notify_select_event()
call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-03 03:19:34 +00:00
lillo
2b1e7eaca7 some more small fixes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-31 14:32:56 +00:00
lillo
5e7d6a17a0 Enabled the single ordered queue scheduler and made some little fixes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-31 13:20:00 +00:00
Axel Dörfler
41691b996a Replaced kmalloc(), kfree(), and kstrdup() with the POSIX equivalents.
Implemented realloc().
Adapted all other sources, some minor cleanups in some files as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 23:07:06 +00:00
Axel Dörfler
4a2e58074d select_info had the wrong size (uint8 instead of uint16).
Corrected POLLNVAL handling.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 05:41:10 +00:00
Axel Dörfler
c4943b79fe Forget to free the data allocated in common_select(), and common_poll()...
Changed the header guard in vfs_select.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 04:21:22 +00:00
Axel Dörfler
1e7eb4c232 Some style cleanups in khash.c - I just realized that we have two different
hash implementations in that file... we should really remove one of them.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 04:03:13 +00:00
Axel Dörfler
58ec046735 Added support for select(), and poll().
Not yet tested.
Moved the CHECK_USER_ADDRESS() macro from vfs.c to kernel.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 03:54:07 +00:00
Axel Dörfler
88fae79de6 Moved queue functionality out of module.c and into kqueue.h.
Changed module.c and int.c to use that one.
Some minor cleanups in module.c.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 03:42:40 +00:00
lillo
f2bc61304f replaced sys_kill with general thread-aimed sys_send_signal; cleaned up
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-28 20:38:16 +00:00
lillo
a2117f0bc7 reworked snooze to work in function of the newly added (and kernel exported) snooze_etc. Activated libroot counterpart(s).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-27 12:06:40 +00:00
beveloper
6652c2eae9 removed some unused headers
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 19:27:39 +00:00
lillo
5cdacbaabb *LOTS* of small changes to make the kernel compatible with Be's KernelExport.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 16:13:36 +00:00
lillo
343b352fe1 Signals, 2nd pass: syscall restarting now only works on EINTR (removed other exotic retcodes like ERESTARTSYS); signal handlers now receive 3 args, and the vregs struct is used to save the signal context, making the system beos compatible.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 13:31:22 +00:00
beveloper
06d016b380 renamed thread_entry
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 12:58:52 +00:00
lillo
8fe70e8212 beos compatibility fixes: exit_thread now issues a signal; wait_for_thread returns B_INTERRUPTED if target thread gets killed
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 01:11:15 +00:00
Axel Dörfler
65ea9e24b5 Accidently removed linkhack.so from the build in the previous commit.
Added strto[u]l[l] functions to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 00:13:27 +00:00
Axel Dörfler
a8cd036239 Removed strtoq()/strtouq() from the build (both are deprecated functions, and
not available in BeOS, so there is no reason to add them).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-25 22:45:23 +00:00
lillo
9870ddcea7 kill now sends the signal to the main thread of a process only. To target a specific thread use the new send_signal syscall. Also added set_alarm.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-25 22:36:08 +00:00
Daniel Reinhold
4123d76182 bug fix: addr is an unsigned long, not a pointer type
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-25 11:08:39 +00:00
Daniel Reinhold
bd2251961c bug fix: pointer indirection error while checking cookie value
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-25 11:04:11 +00:00
lillo
f510e6ce60 posix signals support, 1st pass
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 17:31:10 +00:00
Bruno G. Albuquerque
3afbe60d92 Fix a bug reported by BeFree. It looks the PCi stiff works now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-17 23:11:00 +00:00
Axel Dörfler
28c9a687e6 Added forgotten os/time.o, stdio/fseek.o, and stdio/rewind.o to the build.
Implemented index syscall functions in VFS.
Added fs_index.c to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-17 19:34:09 +00:00
Axel Dörfler
f4e51a2dfb Added a new write_stat() call to the file descriptor operations (plus syscall).
Renamed sys_read_stat() to sys_read_path_stat() - sys_read_stat() is now
the fd operation (same for the corresponding write call).
Removed the sys_write_attr_stat() call because it is no longer needed.
Added stat(), fstat(), and other POSIX calls to the kernel - many are still
missing (mainly from stdio).
Added symbols (but no implementation) for unistd.h's process id functions.
Adapted libroot calls that used sys_read_stat() before to the new architecture.
module.c and bus_man.c now use stat() directly instead of the sys_read_path_stat()
call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-17 03:09:25 +00:00
Axel Dörfler
f6fabd1b6d Added syscalls for the attribute functions and fs_attr.c to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-16 16:14:49 +00:00
Axel Dörfler
4544e733cd Removed the debugging stuff I added to vm_page.c - things should now be
much smoother again... :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-14 01:45:15 +00:00
notion
ea4148fa59 A few quick fixes for some VM bugs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-08 21:16:24 +00:00
Axel Dörfler
ef77a305f8 vm.c: Added user_strlcpy() (and the implementation in arch_cpu_user_strlcpy())
which is now used thorough the VFS code instead of user_strncpy().
fd.c: Replaced some return codes.
vfs.c: joined attr_dir_open(), and attr_dir_open_fd(), added sys_/user_
calls to access attributes, and attribute directory.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-08 03:24:51 +00:00
Axel Dörfler
edef81d01c Fixed a compilation bug, dunno why this got through...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-08 03:06:55 +00:00
Axel Dörfler
bc9fd4cc49 Removed the stupid debug output I accidently commited, and replaced them
with something useful.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-08 01:14:44 +00:00
Axel Dörfler
f7d5ad8c90 Moved seek functionality from the fs to the vfs.
Renamed read_page/write_page to read_pages()/write_pages()


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-08 00:42:17 +00:00
Axel Dörfler
c01214de27 Removed the debug output that was accidently added by the last commit.
Included NewOS change 1656 (O_CLOEXEC support, and a bug fix in get_vnode()).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-07 15:31:40 +00:00
Axel Dörfler
94fc97f703 Return type of thread_set_priority() was wrong.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-05 19:45:31 +00:00
Axel Dörfler
48d81f1962 Cleaned up the source a bit, and rearranged the code, (hopefully) no functional
changes, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-05 19:38:42 +00:00
Axel Dörfler
f7a056e53c Some minor changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-05 17:00:44 +00:00
Axel Dörfler
68687d6163 Now includes sem.h (since it needs the private create_sem_etc() call).
Cleaned up the source a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-05 01:20:39 +00:00
Axel Dörfler
634a41725a The main reason I commit this: the last change also made set_sem_owner() to check
for a valid team id.
Added a comment about a race condition in set_sem_owner().
Some minor style changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-30 03:48:59 +00:00
Axel Dörfler
3fa1fa66f1 Cleaned up the source, made it compatible with our style guide (i.e. global
variables now have the 'g' prefix).
Fixed a very unlikely race condition in create_sem_etc() (can only happen if
that call isn't used properly).
Fixed some wrong return values (i.e. B_BAD_TEAM_ID wasn't returned anywhere).
Optimized _get_next_sem_info(): it now only grabs the semaphore lock
if it has good reason to do so.
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-30 03:43:32 +00:00
Axel Dörfler
79f4cb3e2c remove_fd() is now static.
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-30 03:31:42 +00:00
beveloper
64ea4a7aa7 unified Bochs debugging option
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-30 02:25:11 +00:00
beveloper
405439be5c unified Bochs debugging option
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-30 02:23:36 +00:00
Axel Dörfler
36cfa7d4f8 The USE_WALL setting currently doesn't work, because
vm_translation_map_create() checks if the kmalloc()'d page is aligned - maybe
we should just disable the USE_WALL setting if size is PAGE_SIZE for now...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-29 04:05:18 +00:00
Axel Dörfler
3904aa6bf1 Shouldn't do anything so late; just fixed another bug in the wall code.
Commit early, commit often, they say...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-29 02:24:42 +00:00
Axel Dörfler
a3da50e5ed Fixed a bug in the wall code that actually produced the bug I mentioned
in the last commit... :/


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-29 02:21:22 +00:00
Axel Dörfler
ebe92efe60 Added a front and back wall to each kmalloc() allocation, if USE_WALL is
set to 1 (which it currently is).
I've only used it with bochs yet, and it lets it crash reliably in some
VFS code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-29 01:58:22 +00:00
shatty
2c26aebcd8 changed return types for "std_ops" functions from int to int32, fixes warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-29 00:28:57 +00:00
Axel Dörfler
75c2064c1a Fixed the crashing bug in the VFS - we can't make any assumptions about
the "device" parameter of fs_mount.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-28 02:19:26 +00:00
Bruno G. Albuquerque
b1b72e8797 Automatically add the Bochs keyboard hack when --bochs-debug is used in the configure script.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-28 01:37:00 +00:00
beveloper
5cd2d50a61 Allow using the kernel debugger from inside BeBochs using your local keyboard.
You need to enable BOCHS_INPUT_HACK and type inside the BeBochs window,
NOT inside the Terminal where the output is printed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-28 00:51:38 +00:00
Axel Dörfler
f4b41f88a2 The private data field in the file_descriptor is now a union to hold different
types of objects (currently fs_mounts, and vnodes).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 03:52:10 +00:00
Axel Dörfler
0a2bd16f7d find_mount() must not lock the gMountMutex - the caller must do this; that
also fixed a bug, because fs_read_info()/fs_write_info() already locked the
mutex before calling find_mount().
Implemented the file system API for attribute directories, and index
directories.
Introduced a new macro FS_MOUNT_CALL() to call fs ops directly from the
mount structure.
get_new_fd() now panics if it is called with an unknown fd type.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 03:50:14 +00:00
Axel Dörfler
d8f40dbc54 Moved bootfs.h and rootfs.h to src/kernel/core/fs because they are private
to the VFS, not to the whole kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 01:13:42 +00:00
Axel Dörfler
71c882e5f5 Included NewOS change 1642 (argument checking)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 01:01:54 +00:00
Axel Dörfler
dd36c5aa04 Renamed "calls" to "ops" (yeah, I know, that doesn't make really much sense :).
Completed load_file_system().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-25 16:34:33 +00:00
Axel Dörfler
e04fced505 The available file systems aren't load anymore on startup.
Reimplemented file system handling, it's now loading file systems on an
on-demand basis - code is not tested yet, but should work!
That also fixed a bug that was in that code before (the image was not
unloaded in case of an error in vfs_load_fs_module()).
Renamed fs_id to mount_id.
Renamed all global variables to have the 'g' prefix in vfs.c.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-25 14:10:50 +00:00
Axel Dörfler
62781e5bc4 Renamed fs_id to mount_id.
Some clean-ups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-25 14:05:44 +00:00
Axel Dörfler
99e81006d0 Added some tests against wrong values in simple names, like attribute names,
or entry_ref names (paths are safe).
Implemented attr_remove(), and attr_rename().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-25 12:13:09 +00:00
Axel Dörfler
0ee7f6972b Rearranged some functions to better fit in their context.
new_file_fd() is now called get_new_fd(), and can also create fds for other
types as well. Furthermore, it lost some memory if it couldn't allocate a
new fd.
Implemented most of the VFS attribute API (kernel internal only), only
remove_attr(), and rename_attr() is missing for now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-25 02:18:20 +00:00
Axel Dörfler
570b6eaeeb Removed the fs_ prefix from the fs_calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-24 16:17:22 +00:00
Axel Dörfler
d98c7edc06 Fixed more warnings due to the int/int32/status_t change.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-24 00:08:50 +00:00
Axel Dörfler
e58fbc960b Adapted the VFS and internal file systems with respect to changes made
in fs_interface.h.
Fixed many warnings due to the int/int32/status_t changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-23 23:24:12 +00:00