Commit Graph

690 Commits

Author SHA1 Message Date
Axel Dörfler
7fc8f0544e Fixed addition of empty parameters in certain situations.
Improved the output of get_driver_settings_string().
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-15 13:03:49 +00:00
Axel Dörfler
b959dda1b7 This replaces kernel/core/driver_settings.c - its functionality will now
be available to userland applications as well.
Furthermore, the API & grammar has been extended. There is now a '=' allowed
between the key and its values. Also, '\n' can now be replaced with ';'. These
changes allow flat driver_settings strings.
It doesn't work perfectly right now, but it's a start. A test application
will be added soon, the kernel file will be removed soon as well, and the
build updated.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-15 04:06:43 +00:00
Ingo Weinhold
08427f8cfc Publish partitions in _ScanPartition() and unpublish them in the destructor.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-14 00:08:56 +00:00
Ingo Weinhold
f7672ebc25 * Made {Publish,Unpublish}Device() virtual and implemented them in
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
2003-06-14 00:06:57 +00:00
Ingo Weinhold
2609ebac90 Several fixes necessary to get the partition scanning working.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-13 22:08:10 +00:00
Ingo Weinhold
ef9b1b52ee Implemented a preliminary disk device scanning in KDiskDeviceManager.
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
2003-06-12 22:21:10 +00:00
Axel Dörfler
f3df767f76 Added a BeOS compatible strdup() implementation; unlike other strdup()
implementations (and against its standard behaviour), it does now
handle a NULL string parameter gracefully.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-12 19:35:33 +00:00
Axel Dörfler
0c6fce04e6 Removed the BSD strdup() routine since it is not BeOS compatible.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-12 19:34:03 +00:00
Axel Dörfler
6b3445e288 Applied NewOS patch 17xx (its repository is currently down...): now sets
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
2003-06-12 03:41:38 +00:00
Ingo Weinhold
ac63679417 Small changes in the header, and implemented everything needed for scanning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-11 22:04:34 +00:00
Ingo Weinhold
1bf21e6a40 * Added CreateChild().
* Added Publish/UnpublishDevice(). Not implemented yet.
* small fixes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-11 22:03:26 +00:00
Ingo Weinhold
13a452eaee Added an Init() amd dealt with the PrettyName().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-11 22:00:59 +00:00
Ingo Weinhold
450c7dd609 Added basic disk system management.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-11 21:59:27 +00:00
Ingo Weinhold
ec9690ccf2 Added new files, and we now link against our kernelland_emu library, because modules are used.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:47:10 +00:00
Ingo Weinhold
6778f21163 Some fixes in the header and a very basic implementation. In theory the functionality for scanning partitions is implemented, as well as loading/unloading the partition module.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:40:09 +00:00
Ingo Weinhold
0b6c74bbe3 Implemented some more bits of KPartition. Added a very useful Open() method.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:37:43 +00:00
Ingo Weinhold
f254d01839 Implemented KDiskSystem. Should be almost complete.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:36:31 +00:00
Ingo Weinhold
29a37d780d Implemented some basics of KDiskDeviceManager.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:35:57 +00:00
Ingo Weinhold
537635f1d1 Implemented basic parts of KDiskDevice.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:35:12 +00:00
Ingo Weinhold
be433342af A read-/write locker. Again, something that might also be useful elsewhere in the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:32:33 +00:00
Ingo Weinhold
86ea6f7f9b A slightly modified BLocker. We should provide something like this for the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:29:52 +00:00
Ingo Weinhold
1844af0bfa Mostly empty implementations for the disk device manager classes. Save KPartition which is partially done.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-09 23:10:09 +00:00
Axel Dörfler
121a2e82c0 Really fixed build (while keeping the app in the build).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-21 03:35:56 +00:00
Bruno G. Albuquerque
7be092433c Fixed build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-21 03:00:38 +00:00
Axel Dörfler
cb7bb042d1 Fixed a typo in the Jamfile that prevented "cpuinfo" to build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-17 15:35:55 +00:00
beveloper
3b3c3547a5 Updated jamfiles to match recent cvs changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-16 23:31:38 +00:00
Axel Dörfler
553f11cc8b The cpuinfo command is now locally built and added to the tree.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-13 15:26:28 +00:00
Axel Dörfler
897285de73 Removed x86 dependent "cpuinfo" command from the main build (it's now added
locally in the app/cpuinfo directory).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-13 15:25:04 +00:00
Axel Dörfler
8f048d2b40 Added missing arch_*() functions, removed the (empty) atomic_*() definitions,
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
2003-05-13 15:20:47 +00:00
Axel Dörfler
9cf09b95ed Now located in src/kernel/ldscripts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-13 02:22:10 +00:00
Axel Dörfler
7058303f99 Added add-on.ld and moved kernel.ld to the correct location.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-13 02:21:16 +00:00
Axel Dörfler
f48e0d551d Updated ld-script location.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 01:00:20 +00:00
Axel Dörfler
e02284d547 Are now located in src/kernel/ldscripts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 00:51:11 +00:00
Axel Dörfler
87ea713dec This file isn't used anymore (the config will be created by the build process).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 00:46:39 +00:00
Axel Dörfler
a457ef3c93 Moved the ld-scripts all in one place, instead of spread all over the
repository.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 00:45:08 +00:00
Ingo Weinhold
7f879cccff Rename SystemMain to BuildPlatformMain.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 17:29:06 +00:00
Axel Dörfler
db44cc624c Fixed a typo: don't use copy&paste...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 05:52:41 +00:00
Axel Dörfler
23d0f041d6 Added ldscripts for other kernel stuff.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 05:46:05 +00:00
Axel Dörfler
ed6b39346e Added dumb implementations for system_time() and TLS: system_time() currently
just returns the contents of the time base register, and the TLS implementation
is only working correctly for single threaded applications. Enough for testing,
at least.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 05:44:12 +00:00
Axel Dörfler
f45e90df37 Now accepts more PowerPC "standard" defines, which allows it to build here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 03:15:41 +00:00
Axel Dörfler
14fcd1e5aa The cpuinfo app is only added to the x86 build for now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 03:13:19 +00:00
Axel Dörfler
1f78a92b12 Implemented the atomic functions to get in touch with PPC assembly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 02:17:54 +00:00
Daniel Reinhold
cb25a0921b implemented tcsetattr()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-04 09:11:25 +00:00
Daniel Reinhold
15474ec36c added stubs for the termios speed control functions
they are stubs because the BeOS does not support them


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-04 08:06:33 +00:00
Daniel Reinhold
f291226628 initial implementation of ttyname()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-04 07:13:44 +00:00
Daniel Reinhold
789a8d2791 add termios to the build
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-04 03:29:59 +00:00
Daniel Reinhold
d122daf52a initial support for termios in libroot
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-04 03:25:10 +00:00
Daniel Reinhold
953aa0fc95 fleshed out some tty stuff...
isatty() is fixed - altho this is basically academic since we don't have any
drivers for terminal devices written yet (but at least the code is ready when we do)

also, ctermid() is implemented - which is of no big consequence


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-04 00:53:22 +00:00
Axel Dörfler
060ea25f57 Fixed makeflop on PPC (applied NewOS change 1778).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 17:24:23 +00:00
Axel Dörfler
7cbca7f74c boot headers have been moved.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:33:09 +00:00
Axel Dörfler
b977a6087c The stage2 boot loader now links against the new arch dependent boot_arch_stage2.o.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:32:35 +00:00
Axel Dörfler
75d416a23e Fixed Jamfile - it doesn't try to build all architectures anymore, but only
the one it can.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:29:04 +00:00
Axel Dörfler
d0c59e6faf boot headers have been moved.
Now builds a boot_arch_stage2.o object file that can be used by the architecture
independent Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:28:05 +00:00
Axel Dörfler
b2704e693c boot headers have been moved, some cleanups, dbg_save_registers() renamed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:20:38 +00:00
Axel Dörfler
c182223b6e Updated core/arch/ppc section to be up-to-date again. Note, this only let
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
2003-05-03 16:15:41 +00:00
Axel Dörfler
eda9fea884 Fixed Jamfile to not use OBOS_TARGET_DIR any longer (but OBOS_ARCH instead).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:12:46 +00:00
Axel Dörfler
99b8586b91 boot headers have been moved.
Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:11:59 +00:00
Axel Dörfler
16b357f26a Renamed dbg_save_registers() to arch_dbg_save_registers() since it is implemented
in the arch dependent section.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:10:54 +00:00
Axel Dörfler
53a2f3f583 boot headers have been moved.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:09:41 +00:00
Axel Dörfler
4802643275 stage.2 header has been moved.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:09:01 +00:00
Axel Dörfler
64aebcff0e Added glibc's proprietary strchrnul() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:50:10 +00:00
Axel Dörfler
6e5e43433e atexit() is now thread-safe.
Now calls _IO_cleanup() instead of __cleanup() to be able to be compiled
against glibc stdio as well.
Renamed variables to be much nicer.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:47:56 +00:00
Axel Dörfler
f57208999e Renamed __cleanup() to _IO_cleanup() to be able to compile the glibc version
as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:40:53 +00:00
Axel Dörfler
2b64308b14 Removed an unused header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:39:26 +00:00
Axel Dörfler
80403b993b Fixed arch Jamfile to not use OBOS_TARGET_DIR any longer.
Added math-arch PPC files - general status: working but not optimized.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:38:58 +00:00
Axel Dörfler
a0c16735c9 Added a temporary isatty() implementation (just checks for the fd number for now).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:36:24 +00:00
Axel Dörfler
be3d86f793 Added empty Jamfile for the PPC build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:31:22 +00:00
Axel Dörfler
ec639282c8 Added files to build the PPC version. rldreloc.inc doesn't do anything
useful yet, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 13:47:03 +00:00
Axel Dörfler
8b75b64e81 Small cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 13:44:56 +00:00
Axel Dörfler
a8130cded6 exit() now calls _thread_do_exit_notification().
Note, this is incompatible with the BeOS behaviour, which didn't call
the hooks when you exit()ed a program.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-28 11:11:26 +00:00
Axel Dörfler
c1615a93f0 No longer calls _thread_do_exit_notification() as exit() now does it.
Note, this is incompatible with the BeOS behaviour, which didn't call
the hooks when you exit()ed a program.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-28 11:10:09 +00:00
Axel Dörfler
d9e72f220a Reenabled the broken assert in free() and applied Travis' NewOS patch 1764
(which fixes that assert).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-21 08:25:26 +00:00
Axel Dörfler
c1705065da Doh, forget to add the license and author information.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-20 18:51:55 +00:00
Axel Dörfler
74b016ecad Added a basic pthread_mutex and pthread_mutexattr implementation which
will come in handy for the glibc stuff - and is great for our libroot.so,
too.
Everything should work except for: pthread_mutexattr_(set|get)prioceiling/
protocol(). That might be added at a later time, though, I don't consider
it a high priority.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-20 18:48:54 +00:00
Axel Dörfler
8120de4558 Implemented on_exit_thread() notification, making use of the new second
thread argument.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-18 09:41:10 +00:00
Axel Dörfler
08b73e5905 Added another argument parameter for the thread creation code. Helps
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
2003-04-18 09:38:28 +00:00
Axel Dörfler
8b5c1ef5f6 Does now call _thread_on_exit_notification().
Note, this probably should be called in exit() not here (for now, I copied
the BeOS behaviour).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-18 09:34:49 +00:00
Axel Dörfler
f68d61b912 Added a test for the on_exit_thread() implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-18 09:17:29 +00:00
Michael Phipps
d50d9a6a18 More code cleanup. Removing unused variables. Simplifying and shrinking
vpage to be nearly a TLB entry. Final stripping will occur with kernel
integration. More comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-26 04:00:38 +00:00
Axel Dörfler
95fed0d3e1 Added the includes needed to build GNU's libio package. Tries to be glibc
compatible while cleaning them up and reflecting our standard header
locations a bit more.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-24 00:15:24 +00:00
Axel Dörfler
c387fbc54b Added Jamfile to build the libio part of glibc (for now).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-24 00:10:20 +00:00
Axel Dörfler
1d94abd7ae Initial revision
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-24 00:07:36 +00:00
Axel Dörfler
38c6b242e6 Initial revision
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-24 00:03:53 +00:00
Axel Dörfler
523bdc7eca Initial revision
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-23 23:59:15 +00:00
Axel Dörfler
d1c90ca8b2 Initial revision
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-23 23:57:50 +00:00
Axel Dörfler
000d24f681 Initial revision
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-23 23:49:22 +00:00
Axel Dörfler
3075346683 Applied patch from Maurizio: fixed setting data part in smp_send_broadcast_ici() msg.
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
2003-03-18 02:08:51 +00:00
Michael Phipps
69d79fa9f8 More changes and bug fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-07 00:11:10 +00:00
Daniel Reinhold
c2a1fc3f66 removed a macro accidentally re-introduced on the last commit
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
2003-03-01 07:22:13 +00:00
Daniel Reinhold
70dee992a3 style changes -- purely cosmetic
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
2003-02-28 21:21:46 +00:00
beveloper
fb6067c507 removed experimental special case
fixed bug in get_nth_pci_info


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-28 14:52:05 +00:00
Michael Phipps
a48062f5fa Many bug fixes and changes.
Also added "locked list" - a semaphore protected list derived from list.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-27 04:41:44 +00:00
Michael Phipps
7c9135c008 Updated and added some tests.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-27 04:40:34 +00:00
Axel Dörfler
43604406d8 Added a new call vfs_new_vnode() which can be used when a new vnode is created
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
2003-02-21 13:49:26 +00:00
Michael Phipps
ccbd79a87e Update
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-18 23:56:53 +00:00
Axel Dörfler
26dade365a Added the _single_threaded global variable as it is needed by the std I/O
implementation in BeOS.
(spawn_thread() will change the value later, but that will come with the whole
stdio implemenation (as it would now print out a warning))


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-11 19:51:49 +00:00
Axel Dörfler
bdd1c86cbb Added a newline and made the B_ error codes more prominent (removing the POSIX
and NewOS error codes, kept the former as comments).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-11 19:49:58 +00:00
Axel Dörfler
7acdf0be55 Made the load_driver_symbols() prototype equivalent to the KernelExport.h
header (where Philippe added it again temporarily).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-11 19:34:12 +00:00
Ingo Weinhold
0598bd378f extended_partition_info::mounted_at is gone.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-08 00:40:48 +00:00
Ingo Weinhold
6342ffb32b Moved the implementation of the disk_scanner API out of the test code to the libroot sources, where it belongs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-02 22:47:24 +00:00
Axel Dörfler
81afd95226 Cleanups (mainly variable types).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 21:25:53 +00:00
Axel Dörfler
f9d7cb3acc Now uses the arch/x86/smp_apic.h header; changed apic_read/write() to accept
offsets as parameter to specify the APIC register.
Added an obviously missing apic_write() call.
Code cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 21:24:50 +00:00
Axel Dörfler
7870c58c18 Now uses the new smp_apic.h header file.
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
2003-01-30 21:22:03 +00:00
Axel Dörfler
2dc97fdf08 The dprintf() function scrolled one line too late.
Also fixed a comment and the processor warning text.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 19:52:49 +00:00
Axel Dörfler
7a6bb51e08 Just some cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 19:49:24 +00:00
Axel Dörfler
9e63d45563 Moved the fd.c source file into the fs directory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 19:37:44 +00:00
Philippe Houdoin
f3eabb6abd Backport time tracking fix from NewOS:
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
2003-01-29 21:59:37 +00:00
Axel Dörfler
74eff974c5 Fixed a variable misnamer I introduced earlier (team -> threadID).
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
2003-01-27 13:55:57 +00:00
Axel Dörfler
868dc95975 Makes use of the new daemon_hook typedef.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 13:53:10 +00:00
Axel Dörfler
ec7567030b load_driver_symbols() is no longer part of the public API.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 13:51:46 +00:00
Axel Dörfler
2760fd9495 Renamed resched() to scheduler_reschedule().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 04:01:28 +00:00
Axel Dörfler
4b2d22c03e Fixed userland snooze() implementation, snooze_etc() is now also exported (as
required by the Be API).
Removed all posix signal functionality from the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 03:19:18 +00:00
Axel Dörfler
88b64a6feb Big cleanup.
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
2003-01-27 03:17:36 +00:00
Axel Dörfler
b848af2071 Greatly cleaned up the source.
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
2003-01-27 03:11:45 +00:00
Axel Dörfler
6d8aafc66e Added comments to sys_(get|put)env() - please remove them from the kernel.
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
2003-01-27 03:09:33 +00:00
Axel Dörfler
dba0db7fbe Fixed all the broken signal stuff. Now correctly calls the user_*() function,
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
2003-01-27 03:07:30 +00:00
Axel Dörfler
2e7d51f89b Updated due to the changes in scheduler.c (resched() -> scheduler_reschedule(),
thread_enqueue_run_q() -> scheduler_enqueue_in_run_queue()).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 03:05:09 +00:00
Axel Dörfler
c333b5aa8e Replaced the standard thread functions with a BeOS compatible set.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 03:02:24 +00:00
Axel Dörfler
51cc35a759 Cleaned up the source, rearranged some functions. Now exported functions
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
2003-01-27 03:01:35 +00:00
Axel Dörfler
8ccc1ad67d mutex_lock() now prints out the semaphore ID if it panics.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 02:58:17 +00:00
Axel Dörfler
fe8ffea9f4 Removed the kernel_posix_signal.o file - it's not needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 02:55:34 +00:00
Axel Dörfler
dc7fb22c07 Forgot to resume the kernel_daemon thread.
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
2003-01-27 02:02:20 +00:00
Axel Dörfler
429578fb0b Team/image stuff now uses lists instead of kqueues.
The kernel_daemon now utilizes the updated list API.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-26 23:31:38 +00:00
Axel Dörfler
878c4156af Added two convenience functions: list_add_item(), list_remove_item().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-26 23:30:53 +00:00
Axel Dörfler
28bf3daa5d Implemented the kernel daemon service. It's not yet tested, but should be
equally inaccurate as the BeOS R5 version :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-26 17:31:33 +00:00
Michael Phipps
556632b760 bug fixes found as a resule of testing
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-24 05:41:40 +00:00
Michael Phipps
cd5053c617 More tests to round out (for now) createArea
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-24 05:41:10 +00:00
Axel Dörfler
822ea83244 list_add_link_to_tail() didn't work correctly.
Applied fixes by notion: removed two redundant if-statements, replaced
(link *)list with &list->link.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-21 23:43:13 +00:00
Michael Phipps
f5b024fb5d Slight changes/bug fixes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-21 02:45:14 +00:00
Michael Phipps
d89abe1f52 Added more mmap tests, and a file indicating what tests are yet to be done.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-19 03:00:31 +00:00
Axel Dörfler
481ce84e6c A very basic node monitoring test - directly uses the kernel calls (since
there is no libbe.so yet).
Doesn't even query the port; just causes send_notification() in the kernel
to be called which will print out some info.
Added to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 14:20:05 +00:00
Axel Dörfler
32a301820f Added node monitor syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 14:18:04 +00:00
Axel Dörfler
8177f89fd1 Added list.c to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 14:16:44 +00:00
Axel Dörfler
8cd0fe6e99 Added new doubly-linked list implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 14:15:20 +00:00
Axel Dörfler
5afbd29256 Added new files to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 14:14:07 +00:00
Axel Dörfler
457f7be6f9 Now uses the new list primitive instead of its own implementation (for linking
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
2003-01-18 14:13:44 +00:00
Axel Dörfler
a7d654ad0a Added almost complete node monitor implementation - support for watching mounts/
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
2003-01-18 14:11:02 +00:00
Daniel Reinhold
d73534e172 added scanf() to stdio
(very curious that this was not already in there!)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 09:29:44 +00:00
Michael Phipps
6c18c9fa14 Small changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-17 01:40:36 +00:00
Michael Phipps
fa0e80da02 Small fixes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-17 00:54:52 +00:00
Axel Dörfler
4530a79f4f Forgot a return value in remove_images().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 16:37:47 +00:00
Axel Dörfler
81ff593b02 Added .fini section to the ld scripts.
Fixed a bug that asked ld to discard the .dtors section.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 11:28:36 +00:00
Axel Dörfler
4f8cebc925 Fixes the build of rld.so, removed unneeded entries in librld.a.
libglue(2).so are now using the new startup code.
libroot.so now statically links against libgcc.a for now (to be able to load
BeOS executables).
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 11:25:52 +00:00
Axel Dörfler
b8000952ca Implemented BeOS compatible startup code.
This has almost the same layout as in BeOS - the only difference is crt0.o which
is what is usually provided by crti.o/crtbegin.o/crtend.o/crtn.o. When we want to
move to GCC's crtbegin/end code, we have to introduce crti.o and crtn.o. This is
required because the crtbegin/end stuff assumes to be inserted between a function
start (crti.o) and a function end (crtn.o) - which can only be achieved with assembly,
and is therefore platform dependent.
start_dyn.c is used for executables and calls main() (among other).
init_term_dyn.c functions are called from the .init/.fini sections and search
for B_INIT/TERM_BEFORE/AFTER_FUNCTION_NAME, and execute them if they are present.
Both use BeOS compatible call scheme but add parameters to the end.
lib0.c is no longer needed, because init_term.c/crt0.c replace its functionality.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 11:18:01 +00:00
Axel Dörfler
f4c8b1eb40 Added support for BeOS executables, and the .init/.fini sections.
Note, the _start() function is now called with 4 parameters, because BeOS
requires the first three (the fourth isn't used in BeOS executables).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 11:08:18 +00:00
Axel Dörfler
dd6f547c66 Moved "__progname" from startup code to libroot_init.c (because BeOS start_dyn.o
doesn't export it), initialization has also moved to initialize_before().
Added BeOS compatibility stubs to allow execution of BeOS native apps - added
comments to every function; some of them might be removed later on again.
Also moved "environ" to posix/stdlib/env.c for the same reason.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 10:50:14 +00:00
Axel Dörfler
75b2a820de Updated to be a bit more BeOS compatible (now calls B_INIT_BEFORE/AFTER_FUNCTION_NAME
instead of "INIT_BEFORE/AFTER_CTORS".
Uses the new runtime linker exports.
Note, this is not yet BeOS compatible (will need to have init/fini sections)!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 17:22:45 +00:00
Axel Dörfler
e6e5ebbc10 Added a comment about the "non-thread-safety" of gStatus (dlerror()).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 17:16:20 +00:00
Axel Dörfler
7dce97278f Implemented the unix dlfcn API; note, the RTLD_xxx modes are not yet supported
by the loader. dlerror() is not thread-safe.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 17:15:17 +00:00
Axel Dörfler
eadb1c453a Now calls the __init__image() initializer function.
INIT_BEFORE_CTORS() is now called initialize_before() to be compatible
with BeOS start_dyn.o.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 17:13:32 +00:00