Commit Graph

1979 Commits

Author SHA1 Message Date
Axel Dörfler
8210771d09 Oops, exec_team() should rename the team as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-20 22:31:28 +00:00
Axel Dörfler
77a6e0beb6 exec_team() now renames its main thread to the new program name.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-20 22:05:50 +00:00
Axel Dörfler
4f952f6c3a pipefs_create() didn't call Inode::Open(), and since the read/write counters
were messed up because of that, most shell pipe access didn't actually work
(thinks like "cat x | grep y", or "a=`uname -m`) - they now do.
Added more debug output.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-20 21:51:01 +00:00
Axel Dörfler
50f99a085e Now properly allocates the kernel stacks of the other CPUs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 22:04:12 +00:00
Axel Dörfler
0641ddaabc Now uses the KERNEL_STACK_SIZE constant to allocate the idle thread kernel stacks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 21:56:45 +00:00
Axel Dörfler
672ba60193 Removed unnecessary reference to ktypes.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 21:56:02 +00:00
Axel Dörfler
d621b8a482 Now uses the shutdown() function instead of reboot() directly. Maybe this
must be changed again to arch_cpu_shutdown(), since it might not be safe
to properly shutdown from the kernel debugger.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 21:55:12 +00:00
Axel Dörfler
8f60d4cdba Removed dumb put BeOS compatible cache implementation - it's not needed anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 20:29:17 +00:00
Axel Dörfler
10b8d84f32 Added empty file_cache_sync().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 20:24:27 +00:00
Axel Dörfler
583565f02a Added unistd/sync.c to the kernel.
Removed unneeded source grist.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 20:19:53 +00:00
Axel Dörfler
5987043c75 Added new shutdown() function that at least does a sync() before rebooting
the system. Should shutdown all other things, too.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 20:18:27 +00:00
Axel Dörfler
fc5fb64131 Implemented arch_cpu_shutdown().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 20:16:52 +00:00
Axel Dörfler
137270c9e6 Readded our ctime.c - removed equivalent versions from localtime.c, so that
not everything is in this one file.
Removed definition of STD_INSPIRED: this not only fixes some warnings, it
also removes functions that are not exported under BeOS, and there is no
reason to change that.
Added weak export of timelocal() in case STD_INSPIRED is not defined in
localtime.c.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 19:44:09 +00:00
Axel Dörfler
d9dd2139b1 Removed misc.c from the build for now.
Removed unneeded grist from source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 19:12:21 +00:00
Axel Dörfler
48d914c9ce Disabled some unneeded checksum code (cbuf is still "abused" in our ports
and pipefs implementation, but was originally thought for a network stack).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 19:11:04 +00:00
Jérôme Duval
9b51d2f8fb Added implementation localtime.c strftime.c
from ftp://elsie.nci.nih.gov/pub/tzcode2004g.tar.gz
private.h and tzfile.h are in common with timezone compiler, so we put them in headers
Sorry to not use cvs import


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 15:35:23 +00:00
Axel Dörfler
0db0e9aaa2 KSTACK_SIZE, STACK_SIZE, and MAIN_THREAD_STACK_SIZE were all renamed.
Fixed a bug in the team thread start: it did not set sizeLeft correctly
before copying the arguments - shouldn't have had any consequences, though,
as the size of the arguments is known before.
Added a comment explaining the current layout of the main thread stack area.
Now makes use of B_STACK_AREA and B_KERNEL_STACK_AREA.
fill_thread_info() did not correctly set thread_info::stack_end.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-18 18:15:39 +00:00
Axel Dörfler
b139f2481d Renamed KSTACK_SIZE to KERNEL_STACK_SIZE.
Fixed a bug in arch_init_tls() that did not support different stack sizes
(ie. didn't use the thread::user_stack_size variable).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-18 18:11:19 +00:00
Axel Dörfler
8bde4cf98c vm_store::fault() can now decide not to handle the fault - when it returns
B_BAD_HANDLER, vm_soft_fault() will just continue as if there is no fault()
function.
There is now support for the B_STACK_AREA and B_KERNEL_STACK_AREA protection
values: if the former is used, or the latter in combination with DEBUG_KERNEL_STACKS,
a number of guard pages is inserted at the bottom of the stack (depending on
the STACK_GROWS_DOWNWARDS/UPWARDS arch config).
In addition, user stacks are no longer committed completely, ie. they don't
reserve memory for their whole size, only as much as is needed. That may
result in applications crashing when they need a lot of stack and there is
no memory left. Before this change, you could not even run that application.
Since BeOS has a 16 MB stack for the main thread, you could only run about
2 applications with 64 MB before.
Due to these changes, we've now switched to the standard BeOS stack sizes.
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-18 18:03:34 +00:00
Axel Dörfler
d55026c2d5 Added empty implementation of mknod() - should be pretty much what BeOS does.
The "mv" command needed it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-18 16:56:10 +00:00
Axel Dörfler
893e0713fb vm_store::fault() now returns a status_t.
Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-18 14:35:40 +00:00
Axel Dörfler
5d6e6b647c Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-18 04:15:10 +00:00
Axel Dörfler
397e7db6df Brought the userland time initialization into more or less final shape:
- renamed setup_rtc_boottime() to __init_time()
- __init_time() is now initialized at libroot.so startup
- introduced new __arch_init_time() that does the arch dependent stuff,
  for now it just sets the system_time() conversion factor (that's the
  part that will change later on)
- os/time.c now keeps a pointer to the real_time_data around, not only
  to the boot time - maybe we'll it for other stuff as well later.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-18 03:08:36 +00:00
Axel Dörfler
1979c1f90c Page directories are now always allow user read/write access - this reduces
the x86 protection model to page level protection only. It's currently needed
for BeOS compatibility, though we might want to get rid of it later. Thanks
to Jerome for stombling into this :)
arch_vm_translation_map_init_post_sem() did not return a proper status.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-17 15:51:24 +00:00
Jérôme Duval
7bad53a1bc better parenthesis
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9978 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-17 00:22:54 +00:00
Jérôme Duval
b5027c0e2b added ctime_r
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-16 11:24:35 +00:00
Jérôme Duval
b3c1f2c654 removed comments
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-16 00:37:26 +00:00
Axel Dörfler
abb0fbc167 vfs_mount_boot_file_system() now at least checks for the right partition
offset to recognize the boot volume.
This should work well enough for now (as long as you don't have too many
disks in your system).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 20:02:04 +00:00
Axel Dörfler
06db250916 vfs_mount_boot_file_system() now also gets the kernel_args.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 20:00:49 +00:00
Axel Dörfler
17e0266f6e Implemented platform_register_boot_device(): it parses drive_parameters
versions 2.x and 3.x and fills the disk_identifier of the boot disk.
"Dumb" checksum/size recognition is not yet implemented (stores only the
size of the disk for now).
Does not yet create bios_drive structures for any other drives.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:11:27 +00:00
Axel Dörfler
04b9d56a03 register_boot_file_system() now also fills in the kernel_args data about
the boot partition, and calls platform_register_boot_device() for the
rest.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:06:47 +00:00
Axel Dörfler
925f2cab6a get_node_for() has moved into the public VFS API for now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:05:01 +00:00
Axel Dörfler
5d6160d04e panic() now reboots when you press a key.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:03:56 +00:00
Axel Dörfler
356f4957fa Added a function that clears the keyboard buffer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:02:50 +00:00
Axel Dörfler
8a4b1da1e7 Corrected the information where the real/protected mode stacks begin; the
comment did not take the BIOS data area into account.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:01:52 +00:00
Axel Dörfler
0084d31635 Added an additional flags parameter to fs_mount(), "args" is now a const char.
Turned off debugging output in pipefs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 16:43:30 +00:00
Axel Dörfler
ead0d79064 Debug output now uses the TRACE() macro, turned debug output off.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-12 17:21:14 +00:00
Axel Dörfler
fdc19c4c1a Accidently disabled old BeOS API.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-12 17:18:45 +00:00
Axel Dörfler
f99b76aafb Changed fs_mount() call, "args" is now a const char, added flags parameter.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-12 17:03:48 +00:00
Axel Dörfler
eb9f0103f8 file_cache_delete() can now safely be used with a NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-12 16:46:05 +00:00
Axel Dörfler
6d6292cffa Some changes and bug fixes to make the API better to use:
- added user data pointer to cache_transaction notifier
- added functions block_cache_set_dirty(), and block_cache_make_writable()
- cache_transaction_next_block() let's you iterate over all blocks in the transaction
- instead of binding the block contents to the transaction (read-only checked
  out blocks did only see the unchanged blocks until the transaction was closed)
  the block now always shows the current data - even if the old way had some
  advantages, it was terrible to use
- the blocks were not correctly added to the transaction
- improved debug output
- can check if the read-only blocks were changed accidently (compile time option)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-12 16:43:51 +00:00
Axel Dörfler
9ad2b1324f The boot loader places the debug symbols in the kernel args, and since
we don't want to copy them over to the kernel heap, we just don't free
the kernel args if the debug symbols are enabled - and since there are
no driver settings yet in the kernel, this is always for now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 19:43:59 +00:00
Oliver Tappe
23db182d85 - deactivate vtable-thunks, as BeOS never used them and we need to be
compatible; change vtable-label-prefix accordingly.
- removed inclusion of wchar.h, as this breaks the libstdc++-build (hopefully
  this doesn't break anything ?!?)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 19:43:14 +00:00
Oliver Tappe
208f00ecf7 - added missing defines to compile libio with _STDIO_USES_IOSTREAM not being
set (although we do set it now).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 19:39:13 +00:00
Oliver Tappe
2468e805d8 - added comment about why stdin/stdout/stderr and cin/cout/cerr synchronization
never worked in BeOS (and why it works now).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 19:36:30 +00:00
Oliver Tappe
9777605673 - added a (commented out) specification of how to build a standalone libio
which can be used to test haiku's own libstdc++ under R5.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 19:27:32 +00:00
Oliver Tappe
f32abcdce8 - added haiku-specific implementation of bits/errno.h, as required by
the stdlib-part of glibc.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 19:25:29 +00:00
Jérôme Duval
0cdef817cf Added non working functions estimate_max_scheduling_latency and suggest_thread_priority
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 09:19:36 +00:00
Axel Dörfler
85b750f216 Implemented first test implementation of the new block cache and transaction API.
Moved from mutexes to benaphores.
Removed partial write support of the old API.
remove_cached_device_blocks() will now actually free all remaining blocks.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 02:03:39 +00:00
Axel Dörfler
4f727c8fb6 New function hash_remove_first() makes emptying a hash table much simpler.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 01:56:22 +00:00
Jérôme Duval
6eb4c8d477 added gnu regex
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 22:49:35 +00:00
Jérôme Duval
5ebc38dcf6 added regex in our libroot.so, it is the one from our Gnu grep 2.5
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 22:48:36 +00:00
Jérôme Duval
ca72d05ae0 we can't read this data from userland yet, help!
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 22:45:48 +00:00
Axel Dörfler
43576fd35b Removed some debugging output that shouldn't have made it into the repository.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 13:57:03 +00:00
Axel Dörfler
3407cab7da Temporarily added initialization of the system time conversion factor (x86)
to the arch independent section (pure laziness + I am not yet sure how this
will look like on other platforms).
Fixed the clone_area() command: B_CLONE_ADDRESS must not be used in the
same address space, because the area creation then can only fail.
Added an explanation on why the area is cloned at all.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 13:50:52 +00:00
Jérôme Duval
06dae80951 clean up of region=>area, addr_type=>addressSpec, fixed compile errors when trace is active
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 13:42:12 +00:00
Jérôme Duval
2e080fb4d6 switch to struct real_time_data, renamed function and variables
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 12:51:59 +00:00
Jérôme Duval
b138834ceb added a read only cloned area for real time data. untested yet.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-09 12:44:53 +00:00
Axel Dörfler
cb0e529459 A terminated buffer just feels better.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 23:23:17 +00:00
Jérôme Duval
e617ef9b0a line must be computed, fix the bottom of the screen "diff fortunes profile" bug.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 19:42:42 +00:00
Axel Dörfler
3f345c7e95 Implemented clone_area() and _user_clone_area(). Not tested, but should work.
Added some missing consts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 19:26:43 +00:00
Axel Dörfler
5b532f8614 Added fs_volume.h header, "resolved" one of the last old ERR_* error codes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 18:35:47 +00:00
Axel Dörfler
60bbe6afce Our file system are different, and old mount stuff does not work anymore;
we do not support mount() and unmount() anymore.
I've not removed that file in case we decide that we have to export those
functions for whatever reason.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 18:32:43 +00:00
Axel Dörfler
b9be02df0c vm_area_for() did not work correctly; apparently, I had chosen the wrong area_for()
like implementation to copy from...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 15:05:10 +00:00
Axel Dörfler
534d8fbcc7 Fine-graded debug output. Debug output disabled by default.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 14:37:07 +00:00
Axel Dörfler
13dee31361 Now uses create_area() instead of vm_create_anonymous_region().
The page_stats debugger command now understands queue names as well.
Some minor cleanup, improved error checking.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 14:34:35 +00:00
Axel Dörfler
1c11f7ea8a Got rid of regions - we're now back in area-land.
Renamed vm_area::lock to vm_area::protection to be less confusing - wiring
is still called wiring, though (might be renamed to lock later, as that's
how BeOS calls it).
Renamed some global variables to match our naming scheme.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 14:25:09 +00:00
Axel Dörfler
df9445ba48 Replaced region_id with area_id.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 14:17:19 +00:00
Axel Dörfler
98cc327660 Replaced region_id with area_id.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 14:11:46 +00:00
Axel Dörfler
070f286492 Use create_area() instead of vm_create_anonymous_region().
Some minor other cosmetic changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 14:06:50 +00:00
Axel Dörfler
a13f918460 No need to have the kernel daemon run immediately.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 14:03:19 +00:00
Axel Dörfler
07bdb9c6ea Got rid of gSemRegion as it is never really used.
Renamed all static global variables to have the 's' prefix.
acquire_sem_etc() now fails if B_RELATIVE_TIMEOUT and B_ABSOLUTE_TIMEOUT
are both set.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 13:57:40 +00:00
Axel Dörfler
148a8e0c57 Renamed *_stack_region_id with *_stack_area, also replaced region_id with area_id.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 13:53:34 +00:00
Axel Dörfler
877547cdb0 Renamed *_stack_region_id with *_stack_area, also replaced region_id with area_id.
Fixed a bug in snooze_etc(): it could define both, B_ABSOLUTE_TIMEOUT and
B_RELATIVE_TIMEOUT at the same time.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 13:52:11 +00:00
Axel Dörfler
99bd520827 Now makes use of the real_time_data structure.
No longer crashes due to architectural VM restrictions (ie. the area
is kernel only but writable now - should be cloned).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 11:48:04 +00:00
Axel Dörfler
6aa419e55f Correctly implemented find_area() and area_for(), available for userland
and the kernel.
create_area() can now only create kernel areas.
_user_create_area() now directly calls vm_create_anonymous_region().
Removed broken find_region_by_address() and find_region_by_name().
Removed vm_find_region_by_name().
Renamed the idle thread stack areas.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 11:20:20 +00:00
Axel Dörfler
bcf9ffef0b Fixed a possible crashing bug.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 11:17:06 +00:00
Axel Dörfler
8bce4da9ee Replaced vm_find_region_by_name() with find_area().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 11:15:07 +00:00
Axel Dörfler
704df541ac No longer uses private VM API to the base address of the idle thread stacks.
Renamed the idle thread and their stack areas.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 11:12:05 +00:00
Axel Dörfler
3f97e14d42 Fixed a comment as pointed out by Jerome.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-08 10:17:41 +00:00
Jérôme Duval
bc5583d710 added pclose.c to the build, needed for running diff
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-07 11:30:35 +00:00
Jérôme Duval
ca6e6e8d16 removed unuseful clone_area
This is a temporary solution, until moving to a global kernel export data struct


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-07 01:19:27 +00:00
Jérôme Duval
3a88903282 _kern_set_real_time_clock now returns a status, we now use it for errno
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-07 01:16:12 +00:00
Jérôme Duval
d104cdcbae Moved sBootTime to an area, so that userland can clone it
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-06 17:37:00 +00:00
Jérôme Duval
dc80059933 first real_time_clock impl
todo : setup_rtc_area should be called on startup


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-06 17:34:39 +00:00
Axel Dörfler
d2170152b1 _user_set_real_time_clock() can now return an error. It currently even
will do this if this function is called by anyone other than the root
user.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-05 16:08:00 +00:00
Jérôme Duval
c345d00db1 added a check of permission
now set errno and return -1 for errors


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-05 13:25:13 +00:00
Jérôme Duval
4fe4cbd39c added implementation of stime
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 23:02:54 +00:00
Axel Dörfler
fe5b39146f Neither unregister_wait_for_any() nor register_wait_for_any() returned
status.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 16:42:16 +00:00
Axel Dörfler
bd00cbc6a9 Updated the PPC stuff to recent changes in other parts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 16:41:32 +00:00
Ingo Weinhold
90072e721d Always define the symbols needed for basic C++ features. If we link against libgcc.a the symbols from there are simply overridden.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 17:33:17 +00:00
Axel Dörfler
ba44a1e8e1 Changed the way the stores commit their memory: there is no special handling
for temporary memory anymore, it's the store's responsibility to do that
correctly now, and that functionality is reached via the vm_cache using
vm_cache_set_minimal_commitment().
Therefore, the vm_store commit() function now returns a status instead of
the size that could be commited.
Replaced the max_commit mechanism with one that cares about the available
memory, stores can reserve and unreserve such memory. The anonymous_commit()
will now fail in case it could not reserve the needed amount of memory.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 17:24:41 +00:00
Axel Dörfler
d0f68c485f Added uio functions to the kernel (readv/writev[_pos]()).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 16:23:45 +00:00
Axel Dörfler
8c3e1399ec Thanks to Johannes Fortmann, I learned that the blinking mode can be turned
off to enable bright background colors. It's now always done which enabled
me to improve the slider colors a bit.
Therefore, console_set_color() no longer clears bit 8 from the background color.

Now no longer tries to change the palette in non-8-bit modes; that fixes
the strange colors I got in high and true color modes (VESA palette changing
would fail and the fallback VGA palette changing was responsible for the effect).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:43:27 +00:00
Axel Dörfler
2786541fbe Fixed a crashing bug in fill_sem_info() - if it was called for a semaphore
with an empty queue, it crashed. sem_info::latest_holder is obviously not
set correctly, and should be fixed.
Some cosmetics.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:33:01 +00:00
Axel Dörfler
c89cbee2cf Added missing times() function (almost empty stub implementation).
Implemented uio.h functions: readv/writev[_pos]().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:05:35 +00:00
Axel Dörfler
f0dd6fc2c8 Since the status field is still not set correctly (lazy me), reset it to zero at least.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:03:51 +00:00
Axel Dörfler
8c390406d7 Added missing putenv() implementation. Chosed to limit env names to an arbitrary length of 64 bytes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:00:08 +00:00
Axel Dörfler
c1a8ebfa2d Added missing legacy bcmp() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 14:57:15 +00:00
Axel Dörfler
9d171dd8f9 Implemented _{user|kern}_{read|write}v() functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 14:54:10 +00:00