Commit Graph

403 Commits

Author SHA1 Message Date
Ingo Weinhold a97769a5d3 Added {Read,Write}Lock{Device,Partition}().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-15 21:39:34 +00:00
Ingo Weinhold dd43c7769f * Added shadow_id field to user_partition_data.
* Implemented several new syscalls (_kern_find_{disk_device,partition}(),
  {prepare,cancel}_disk_device_modifications(),
  [un]register_file_device()),
* Fixed some details in existing syscalls.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-15 01:10:32 +00:00
Ingo Weinhold 2438192b6c Added a deviceOnly flag to {Find,Register}Device(). Minor {Create,Delete}FileDevice() changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-15 01:05:50 +00:00
Ingo Weinhold 5d22fa967a Shadow partition related changes:
* Fixed handling of the deletion (removal) of shadow partitions. Formerly
  the shadow partition corresponding to the disk device wasn't removed
  properly.
* Added a shadow_id field to the user_partition_data structure which
  contains the ID of the shadow partition, if it is one. The id field
  will hold the ID of the physical partition.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-15 01:00:24 +00:00
Ingo Weinhold e1302deadb Damn, accidentially deleted the changed header via "cvs rm -f". Here it comes again: Disk system iteration functions added.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-08 23:45:53 +00:00
Ingo Weinhold 995d5c53be * Renamed ddm_user_interface.cpp to ddm_userland_interface.cpp which
matches the name of the header much better. :-)
* Implemented the syscalls for iterating through and finding disk systems.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-08 23:23:27 +00:00
Ingo Weinhold 621e29d0b5 Added a DiskSystemLoader class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-08 23:21:34 +00:00
Ingo Weinhold c54d68a84e Should have waited a few more minutes... Renamed the methods {B,K}Partition::Is{Mountable,Partitionable}() to Contains{File,Partitioning}System(). Similar change for the respective flags (B_PARTITION_{MOUNTABLE,PARTITIONABLE}).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-08 17:38:45 +00:00
Ingo Weinhold 55bf93d80d Fixed handling of partition and device flags and statuses.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-08 17:25:32 +00:00
Ingo Weinhold c0455c33b8 * More shadow partition support.
* Writing disk device/partition data into userland buffer added.
* Migration of some definitions into <DiskDeviceDefs.h> header.
* Small bug fixes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-06 23:01:22 +00:00
Ingo Weinhold 64cf9ebc08 Made PartitionRegistrar visible.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-06 22:57:40 +00:00
Ingo Weinhold d885284414 First implementations of Disk Device API related syscalls (iterating through disk devices and retrieving disk device data). As long as we work in userland these aren't real syscalls, of course.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-06 22:56:39 +00:00
Ingo Weinhold a162af3b0e Made KPartition abstract and derived two classes, KPhysicalPartition
and KShadowPartition from it. KPhysicalPartition represents a partition
that exists on-disk, while KShadowPartition is a partition edited by the
API user, but not yet written to disk. Related changes in other classes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-04 23:45:26 +00:00
Ingo Weinhold 5b489f6f16 Got rid of the List template class in the disk device manager source dir. Instead we use the Vector based Kernel Utils classes now. Various related changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-02 16:29:33 +00:00
Ingo Weinhold 83744ac99d Added the ImplicitKey entry strategy, which allows the key to be calculated on the fly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-02 03:17:43 +00:00
Ingo Weinhold 7e65f8eb29 Added a Vector based map implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-01 20:37:17 +00:00
Ingo Weinhold 92ec26a3be Fixed documentation and a minor issue.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-01 20:36:11 +00:00
Ingo Weinhold bd3ed7497a Apparently invoking non-static member functions for default arguments doesn't work. Removed the default argument for Find() and added respective additional versions. Some more minor changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-30 01:00:23 +00:00
Ingo Weinhold 4489db253c Added a Vector based set implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-30 00:53:50 +00:00
Ingo Weinhold eaf9864cde Added a generic Vector implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-29 19:45:10 +00:00
Ingo Weinhold c4de095cd1 Fixed invalid default argument. Not that the compiler eats the file now...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-29 19:44:14 +00:00
Ingo Weinhold 42b47c7c30 Some small interface fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-28 15:53:21 +00:00
Ingo Weinhold e0f43e3e84 The beginning of an AVL tree based map implementation. Well, the tree part
is complete, the interface needs work.
Unfortunately our ancient compiler chokes on this (`Internal Compiler
Error'). I got around the problem by restructuring parts of the code once,
but now I'm stuck -- no idea what I could change. So, there won't be
AVLTree{Map,Set} until we have a working compiler. :-(


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-28 15:49:33 +00:00
Axel Dörfler fb68886768 C++ for the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 22:58:58 +00:00
Axel Dörfler 7f14e583d0 Hide the implementation (the structure definition is now in cbuf.c).
Changed return types to status_t where appropriate.
Now usable from C++.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 16:40:53 +00:00
Axel Dörfler 749df8aa6b Added a benaphore_lock_etc() for a timeout possibility.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 16:39:33 +00:00
Axel Dörfler 0281fb7b32 Removed the old benaphore/rw-lock definitions, added some preliminary new
ones (but real functions/inlines this time).
Renamed recursive_lock_create() to recursive_lock_init() for consistency,
and added a "name" parameter.
Changed "int" return to status_t where appropriate.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:16:53 +00:00
Axel Dörfler 41415a1bc0 Now compilable with C++.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 02:27:43 +00:00
Axel Dörfler 64700310b9 Unfortunately, BeOS & Linux stdio.h have different header guards - our
inbetween solution now have both.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-25 00:22:04 +00:00
Axel Dörfler 0d76efa411 Changed the header guard to be compatible with the GNU stdio.h file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-25 00:09:37 +00:00
Ingo Weinhold b23394f957 * Implemented what was left to do for KDiskDevice and KPartition
management regarding removal and deletion of objects.
* Fixed the file disk system related stuff. KFileDiskSystem now uses the
  virtualdrive driver. The former method was seemed simple and brilliant,
  but the B_SET_PARTITION ioctl wouldn't work.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-24 23:56:16 +00:00
Axel Dörfler c9b0bae94c Needed to compile the boot loader stuff under x86.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-24 17:27:07 +00:00
Axel Dörfler 59eb57ae58 Some work-in-progress headers that are needed to build the heap test.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-24 17:22:11 +00:00
Ingo Weinhold b8777f30dc * Added bool to the AutoLocker constructor indicating that the object
has already been locked. Defaults to false, of course.
* `Abused' the AutoLocker for partition registration/unregistration
  (PartitionRegistrar).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-23 23:42:15 +00:00
Tyler Dauwalder d3a0e7c306 General object constructor class
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-23 05:56:09 +00:00
Tyler Dauwalder ab608058b4 Allocator that uses malloc()/free()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-23 05:55:31 +00:00
Tyler Dauwalder e9ebb4a961 Beginnings of the kernel utils library.
Templated singly linked list class (not quite complete).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-23 05:54:53 +00:00
Ingo Weinhold 62b9e141e1 Added a find_disk_system(). I first thought, this might be a good idea, but I'm not so sure anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:12:20 +00:00
Ingo Weinhold e1d495e36c Added field for the ID of the disk system responsible for the partition's content.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:10:01 +00:00
Ingo Weinhold 3ec225ba22 Some smaller changes to the module interfaces.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:08:26 +00:00
Ingo Weinhold 9007acaee3 Added Dump(). Small fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:04:56 +00:00
Ingo Weinhold fcf461b32c Implemented the scanning functionality.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:03:58 +00:00
Ingo Weinhold b22221ad17 Minor changes to the KDiskSystem interface.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:03:17 +00:00
Ingo Weinhold 0e2967f9d2 Missing header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:00:47 +00:00
Ingo Weinhold 38d5e95af9 Support for creating and deleting (the latter not yet implemented) file disk devices. Added file system addition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:00:20 +00:00
Ingo Weinhold bdc530c737 Some small adjustments for KFileDiskDevice. Added Dump().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 22:57:42 +00:00
Ingo Weinhold 17750c7774 Added a special disk device class, that is responsible for representing
files as disk devices. This will not only be great for testing the
file and partitioning system modules' writing capabilities, it will also
just be a nice feature to have.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 22:54:16 +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
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 30b4d57df4 Added TODO.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:43:52 +00:00
Ingo Weinhold 929ed30bdc The disk_device_data now also have a device_geometry field. That will probably come handy.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:42:53 +00:00
Ingo Weinhold 3ffe913826 Turned the loose set of functions into partition and FS module interfaces.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:41:02 +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 af4c45d5d8 Some small fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:36:53 +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 7bb1e99cb6 Pulled set_string() out of KPartition.cpp for it is useful also in other classes. Added a generic AutoLocker.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-10 22:33:44 +00:00
Ingo Weinhold 4c212afefb Headers for the disk device manager. Very early state.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-09 23:04:54 +00:00
Axel Dörfler ff6ff33a9d Put spaces between "::" in the asm directive to let it compile in C++ mode.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-20 03:02:19 +00:00
Axel Dörfler c0f5672484 Removed unused functions, the C++ extern "C" now spans over all functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-13 15:23:17 +00:00
Axel Dörfler 976b0da0d6 Fixed some C++ build issues with fd.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-13 00:27:29 +00:00
Axel Dörfler bc09b1bfc2 This stdarg.h header file is not needed at all.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 02:29:41 +00:00
Axel Dörfler bb23b77201 Removed unused headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:04:41 +00:00
Axel Dörfler 564cba312e Some header work: removed unnecessary dependencies to stage2.h, fixed
some broken C++ export definitions, added missing licenses etc.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:03:26 +00:00
Axel Dörfler 32439967b9 Removed the arch-dependent relocation definitions (they can now be included
via arch/elf.h).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:02:26 +00:00
Axel Dörfler 8b8fd1c31c Removed the stage2 related headers (they are now in boot/).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 15:59:29 +00:00
Axel Dörfler 45792a2df2 "struct ka" is now "struct kernel_args".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:14:39 +00:00
Axel Dörfler c17f45d123 Some header cleanups.
Renamed dbg_save_registers() to arch_...() since it's arch dependent.
Removed unnecessary dependencies to stage2.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 14:12:16 +00:00
Axel Dörfler f78d32a251 Some header cleanups.
Removed unused keyboard.h header.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 13:26:32 +00:00
Axel Dörfler c4bf92f686 Added new arch_elf.h header where the platform dependent relocation definitions
are located.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 12:51:56 +00:00
Axel Dörfler 62af4ffa5e Added missing or changed/removed outdated PPC headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 12:49:57 +00:00
Axel Dörfler 2b70a18961 Move boot headers into their own private directory (for now, they are still
present in private/kernel/ but this will change soon).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 03:43:30 +00:00
Axel Dörfler a02a5888af Added another argument parameter for the thread creation code. Helps
implementing a more efficient on_exit_thread().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-18 09:21:22 +00:00
Axel Dörfler 896aefa8ec Added a new call vfs_new_vnode(), replaced "int" return type to status_t
for the VFS vnode functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-21 13:44:53 +00:00
Axel Dörfler 9175b5a5e0 Cleanup of the header mess: removed the redundant APIC/mp structure definitions
from smp_priv.h and stage2_priv.h. Created a new file smp_apic.h which now
contains those definitions.
Made the APIC_xxx register offsets only base offsets (without referencing a
particular variable).
Other small cleanups (i.e. "unsigned int" to uint32).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 21:20:33 +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 a9731b41c1 Housekeeping changes and small bug-fixes:
Added new syscall for set_thread_priority().
Replaced the userland syscall snooze_until() with snooze_etc() (the latter
has to be exported to userland and realize snooze() and snooze_until()).
Cleaned the sources - scheduler functions now have the scheduler_ prefix.
Moved signal related stuff into ksignal.h (out of thread.h).
Replaced public kernel API with direct exports (i.e. resume_thread() instead
of thread_resume_thread()).
Removed the thread_create_XXX_thread*() calls, and replaced them with a
BeOS compatible set.
Made some fields of struct thread a bit prettier.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-27 02:54:21 +00:00
Axel Dörfler 7f1f508e13 Added two convenience functions list_add_item(), list_remove_item().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-26 23:30:12 +00:00
Axel Dörfler 04d145c94d The team's image API is now using "list" instead of "kqueue".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-26 23:29:33 +00:00
Axel Dörfler 8a5543b18c Added the kernel_daemon.h header which defines the init function for the
kernel daemon service.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-26 17:27:42 +00:00
Axel Dörfler ffa7234e82 Added a missing struct definition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-20 00:58:13 +00:00
Axel Dörfler f9bdcca59c Added kernel private node_monitor.h header.
Moved definition of "struct io_context" from fd.h to vfs.h.
Introduced new fs/ directory; some cleanups to come.
Added node monitor syscalls.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 14:04:22 +00:00
Axel Dörfler fc3cda204e New list primitive.
A doubly-linked list with some nice features.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 14:02:47 +00:00
Axel Dörfler 658694ae79 Removed the old dlfcn.h header - the real thing is located in posix/.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-17 19:13:12 +00:00
Axel Dörfler 9f956562e5 Missed that one, obviously.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 16:36:25 +00:00
Axel Dörfler c60685fcad Fixed parameter for get_nth_image_symbol().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:36:30 +00:00
Axel Dörfler c679492034 Added a queue to the team structure for the registered images.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:25:04 +00:00
Axel Dörfler 29164895ac Must now include image.h directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:24:12 +00:00
Axel Dörfler 9edac21abd Removed the image_id type definition from ktypes.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:23:21 +00:00
Axel Dörfler ef6d88af27 Renamed "struct rld_export_t" to "struct rld_export", "struct uspace_prog_args_t"
to "struct uspace_program_args", prog_name & prog_path to program_name and
program_path.
Moved the MAGIC_APPNAME to a BeOS compatible MAGIG_APP_NAME from rld_priv.h
to this place.
Removed the dlxxx() exports in the rld_export structure - instead, they will
be implemented using the basic runtime linker API which is a slightly extended
version of the standard BeOS calls (load_add_on() has a "flags" paramater to
allow implementation of dlopen()).
Completed the export API to be able to completely support the BeOS API.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:22:09 +00:00
Axel Dörfler 30f9b99833 Added sys_ prototypes for the kernel image API syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:17:09 +00:00
Axel Dörfler 49c987ef8d Added a macro to iterate through the kqueue.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:00:59 +00:00
Axel Dörfler 1c204d8bb9 Added syscalls for the image API.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 15:59:50 +00:00
Axel Dörfler 9c12864dfd Header for the kernel image API.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 15:59:12 +00:00
Axel Dörfler 074a16b53e Added a private tls.h file with definitions for the reserved TLS slots.
Renamed i386_set_kstack() to i386_set_tss_and_kstack(), because that's what
it does.
Added a new function arch_thread_init_tls() which must be called after
having allocated the TLS area.
Renamed arch_thread_initialize_kthread_stack() to arch_thread_init_kthread_stack()
to be more consistent.
Changed the parameters for arch_thread_enter_uspace() - it now gets a pointer
to the thread structure and takes the user stack pointer from there (which
might also be architectural different).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:17:31 +00:00
Axel Dörfler 1f6480576d Added new fields for the local storage of "errno" in the kernel and user-
level TLS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:13:36 +00:00
Axel Dörfler 20dde76256 I've added a MAIN_THREAD_STACK_SIZE definition, and put the corresponding
BeOS values commented beneath it.
For now MAIN_THREAD_STACK_SIZE is the same as STACK_SIZE.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:12:26 +00:00
Axel Dörfler 7208e95f0e Moved the gdt_idt_descr struct from arch_stage2.h to stage2_priv.h.
Moved the tss_descriptor structure to descriptor.h, updated it to be a
segment_descriptor structure, and provided inlines for set_tss_descriptor(),
set_segment_descriptor(), set_segment_descriptor_base(), and
clear_segment_descriptor().
Also added defines for the different privilege levels and descriptor types.
Removed the unusused and incorrect TSS definition, introduced new
TSS_BASE_SEGMENT and TLS_BASE_SEGMENT macros.
Removed include of arch/cpu.h in arch_cpu.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:02:44 +00:00
Axel Dörfler 346646a2c7 Moved the files vm_types.h, syscalls.h, and vfs_types.h to the private
kernel header directory - they are by no means public includes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:16:35 +00:00
Axel Dörfler 7fae070584 Included NewOS change 1674. Moved private elf structures to elf_priv.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-30 13:34:25 +00:00
Axel Dörfler 11d4dc0bf5 Added a module_test() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 17:59:30 +00:00
Axel Dörfler 420a6221ec Moved thread_types.h to this place.
Changed fd.h inlines because team->ioctx is now team->io_context.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 14:07:35 +00:00
Axel Dörfler 1a72f541b5 Added function prototypes for forbid_page_faults() and permit_page_faults().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 01:51:39 +00:00
Axel Dörfler ebf5be407a Reworked and cleaned the khash; completely removed the new_hash_table
implementation that was buggy, not very flexible, and incomplete.
Changed some variable types, and function names.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-29 08:25:08 +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 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 60d9ed9e3b fixed the ASSERT macro, it did not even compile if DEBUG was defined
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-28 14:07:28 +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
Axel Dörfler ab25550f8e Added a initque() inline function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-17 01:35:01 +00:00
Axel Dörfler 5ef7716d48 Added a missing const to the (sys|user)_select() call.
Broke binary compatibility for the notify_select_event(), since it obviously
hasn't been used on R5 at all.
The new API/implementation is much nicer to use.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-03 03:14:05 +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 7ed765a7f9 Added syscalls for select(), and poll().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-30 02:29:05 +00:00
beveloper 42415555d3 after many changes, the network stack can now be build
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-30 01:21:54 +00:00
Axel Dörfler f2e04b5fa6 Removed the kmalloc(), kfree(), and kstrdup() prototypes.
You now need to include malloc.h (or stdlib.h) and use malloc(), free(),
and strdup().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 23:03:47 +00:00
Axel Dörfler a2cbc788e0 Adds support for select(), and poll() in the kernel - both are realized
using the current BeOS device API.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 03:49:57 +00:00
Axel Dörfler 8f3a4e7dd4 Cleaned up kernel.h; the insque(), remque() functions are now in a separate
header kqueue.h - together with their implementation which was in module.c
Added a new CHECK_USER_ADDRESS() macro that can be used to check if a
user address points into the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 03:31:57 +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
Daniel Reinhold 7401ad9e32 moved trig.h to headers/private/libroot
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-27 01:28:28 +00:00
Daniel Reinhold 5015ea5c9e moved mathimpl.h from headers/private/kernel to headers/private/libroot
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 20:57:07 +00:00
Daniel Reinhold 7c7738f882 moved math.h from headers/private/kernel to headers/posix
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 20:55:03 +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 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
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 3bee4b9931 removed some old, unneeded cruft
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-25 11:58:39 +00:00
Daniel Reinhold 2917ddc323 replaced stdlib.h in 'headers/private/kernel' with a better one in the more standard location 'headers/posix'
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-25 11:50:13 +00:00
beveloper 9fc7164698 allow building everything without local(tree external) header files beeing
used for kernel or kit components


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 20:13:17 +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
Axel Dörfler 146a3000ee Added syscalls for the index functions.
Corrected the prototype for fs_rewind_index_dir() (don't copy and paste...)
Also checked in the syscall definitions for the signal stuff to save Angelo
some work.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-17 18:52:04 +00:00
Axel Dörfler 8e5ca65bc9 Added a new write_stat() call to the file descriptor operations.
Renamed sys_read_stat() to sys_read_path_stat() - sys_read_stat() is now
the fd operation.
Removed the sys_write_attr_stat() call because it is no longer needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-17 03:04:19 +00:00
Axel Dörfler b67f11173f Added syscalls for the attribute VFS calls.
Made some subtle changes to fs_attr.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-16 16:17:28 +00:00
Axel Dörfler 11fe0cb8de Added prototypes for the sys_/user_ attribute calls.
Changed the file_descriptor structure (more status_t, name removed).
Changed "extern inline" to "static inline" in thread.h/arch_thread.h as those
also work with -O0 -g.
Added prototypes for [arch_cpu_]user_strlcpy().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-08 03:19:57 +00:00
Axel Dörfler a03cb82272 Added a field to track the file position to struct file_descriptor
(seek() moved from the fs to the vfs).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-08 00:11:10 +00:00
Axel Dörfler 5ebceff89d Added L_cuserid, ... definition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-06 23:47:50 +00:00
Axel Dörfler ee02a93973 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-05 19:44:27 +00:00
Axel Dörfler eafeadc689 Fixed a bug in the header (didn't include a needed header).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-05 16:55:20 +00:00
Axel Dörfler e96a844909 Removed some type definitions from ktypes.h that are now located in OS.h.
Changed lock.h to like those changes.
Moved the create_sem_etc() from the public OS.h to the private kernel only
sem.h, cleaned it up a bit.
gcc doesn't seem to like the "extern inlines" with -O0 -g, so I replaced
an inline function in thread.h with "static inline" (which it does always
like).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-05 01:17:28 +00:00
Axel Dörfler 03874b549f Removed the remove_fd() prototype, it's now a static function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-30 03:29:19 +00:00
Axel Dörfler 83efd20846 The private data field in struct file_descriptor is now a union (that can
currently hold a pointer to a fs_mount, or a vnode).
Updated the index_dir part of the fs API.
Added FDTYPE_INDEX_DIR in fd.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 03:36:04 +00:00
Axel Dörfler a16194144d Removed bootfs.h and rootfs.h from the private/kernel/ header directory.
They are now located in src/kernel/core/fs, because they are private to
the VFS, not private to the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 01:09:27 +00:00
Axel Dörfler 3c6bf0c8c1 Renamed "calls" to "ops".
Removed unused prototype.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-25 16:36:38 +00:00
Axel Dörfler 4dc5ecd3cb Renamed fs_id to mount_id.
Moved typedefs for mount_id and vnode_id to fs_interface.h.
Removed some unused stuff in ktypes.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-25 13:57:06 +00:00
Axel Dörfler 4e3c12c0af Moved <types.h> to <sys/types.h>.
Removed dependencies on arch/x86/types.h - this file is not really used
anymore, now. Might prevent compiling on Windows, though.
Replaced "int" with "int32" for the id types.
Removed some stuff from ktypes.h because it didn't belong there.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-23 02:36:51 +00:00
Axel Dörfler 3cf8edf4dd Removed the old string.h (new one in posix/)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-17 14:52:42 +00:00
beveloper 90abd04b34 Change int into status_t, and other changes for better BeOS type compatiblitly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-03 02:19:22 +00:00
beveloper b29ceabb12 unbreak the kernel build :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-03 00:36:00 +00:00
Axel Dörfler cedc441e4a Added the realpath() prototype.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-20 10:42:16 +00:00
lillo 615a79cc3c Implemented send_data/receive_data/has_data thread syscalls
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-19 08:28:39 +00:00
lillo e196b7bbc5 added single-queue scheduler; the old scheduler is compiled by default - to enable the new one uncomment the #define at the beginning of thread.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-16 13:14:29 +00:00
Axel Dörfler 5ca8da7a4b Backported the new stack crawl command ("sc", not "bt" like in NewOS) from
NewOS. Untested yet, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-13 21:42:53 +00:00
Axel Dörfler 4c405cbdd4 The fs interface functions should now return a "status_t" rather than an "int".
Added syscalls for, and implemented sys_create_link(), sys_remove_dir().
Implemented link(), unlink(), rmdir().
Fixed the inconsistent path buffer handling in the user|sys vfs functions; the
path buffer is now exactly SYS_MAX_PATH_LEN from userland (incl. terminating
null byte).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-13 20:39:25 +00:00
Axel Dörfler 854fc92a7c Implemented some more calls in unistd.h.
Replaced the unused syscall for getdtablesize() with one for access().
Implemented sys_access() and added it to the file system interface.
Removed the fs function interface from vfs.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@738 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-13 13:51:36 +00:00
Axel Dörfler beddff0f56 Replaced opendir.c with directory.c, implemented chdir(), fchdir(), and
getcwd().
Introduced new xyz(int fd, char *path, ...) style of functions for
sys_setcwd(), and sys_write_stat().
Added missing sys_fstat(). Removed duplicated prototypes in syscalls.h
Fixed some minor bugs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-09 20:20:28 +00:00
Axel Dörfler 14e18e556e getdtablesize() no longer needs a syscall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-09 17:51:02 +00:00
Axel Dörfler d7dd1c2ac2 Changed argument order for sys_read/write() to be more intuitive.
Removed unistd.h (new BeOS-like unistd.h will be in posix/ shortly)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-09 16:57:25 +00:00
Axel Dörfler 24462625e1 Removed header files we'll most likely never use.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 17:23:23 +00:00
Axel Dörfler dc74f4ac15 Added a comment in memheap.h
Added sys|user_write_link() to vfs.h


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 17:22:19 +00:00
Axel Dörfler dfa8e8ef78 Added a sys_write_link() function.
Added a "mode" parameter to the sys_create_symlink() function.
Added an open_mode to the file_descriptor struct.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 05:31:32 +00:00
lillo 854c31f835 finished implementing get_thread_info, get_next_thread_info, get_team_info, get_next_team_info. New ps command behaving like the BeOS one is here, but doesn't work as libroot seems to crash when loaded at process startup... :/
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-04 02:04:37 +00:00
lillo aded06e0aa Second round of changes. Splitted thread.c into thread.c, team.c and scheduler.c. First kernel-only get_team_info and get_next_team_info implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 23:39:50 +00:00
Axel Dörfler ae372703ce Big commit: Added symlink support to the kernel.
- added needed syscalls to access symlink support from userland
- implemented lstat(), symlink(), and readlink()
- added dev_t to ktypes.h (for now - should be in a public header anyway)
- added symlink support to the "ls" command (now calls lstat() and shows the
  link target with the -l option)
- changed the sys_read_stat() call to support symlinks, and updated files
  using that function (it gets an extra argument: bool traverseLink)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 02:03:27 +00:00
Axel Dörfler 409a1aeacd Added some comments
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 01:58:14 +00:00
lillo 3cfbecf1a6 First round of big changes: the term team has replaced proc all over the kernel, the few kern_* syscalls have been renamed to sys_* for consistency, and other small changes. The ps app is temporarily disabled until get_next_team_info is implemented.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 00:41:27 +00:00
Axel Dörfler 3aaee8e5b0 Beginnings of the symbolic link support, though it's not yet working.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-28 18:36:23 +00:00
David Reid 40f83ea15d Add a new line at the end...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 22:28:59 +00:00
notion 66554a4c98 Fixed the overflow bug in heap.c that would occur on allocation of all the memory of the heap.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 14:49:29 +00:00
David Reid 2ba192e3cf Remove the int_ from in front of the enable/disable interrupt functions.
These will need to be reviewed as beos drivers expect them to be available
and using #define won't cover that.

The doxygen stuff doesn't all work though I can't figure out why :(


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 01:02:18 +00:00
notion fde77afb37 Ported my NewOS changes to OpenBeOS.
A couple of changes in various interrupt and thread functions and structures.
These make it now possible to change the stack at any time without making the kernel crash. This is needed for calling VESA 3.0 VBE functions through the protected mode interface.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-24 20:59:25 +00:00
Axel Dörfler 973b9ee6b7 Added the syscalls for sys_open_entry_ref(), sys_create_entry_ref(),
sys_open_dir_entry_ref(), sys_open_dir_node_ref(), sys_create_dir_entry_ref().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-23 14:05:18 +00:00
lillo 65918f386e forgot a little thing
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-20 23:06:32 +00:00
lillo 2880b9ff65 beos compatible timer routines and style cleanups in timer and sem code; also doxygened timer.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-20 22:53:23 +00:00
Axel Dörfler 071f62bc36 Major code cleanup and reorganisation.
Fixed many bugs.
Now, the vfs_ prefix is for functions that are called by other parts of the
kernel. file_ is for file related stuff, dir_ for directory related, and
common_ for both, fs_ for general file system stuff.
Put all prefixed functions together in the source.
Implemented (currently without a user/sys call) opening/creating of entry_refs,
and node_refs (the latter for opening directories only).
Moved vfs_dup(), and vfs_dup2() to fd.c, fd_dup(), and fd_dup2().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-20 00:16:12 +00:00
David Reid c6aa053941 Add some new functions for the big change coming (again) for the
interrupt code. Also start adding doxygen comments :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-19 18:28:57 +00:00
David Reid 8a396015a1 There is no need for this to be here, so move it alongside the code
it refers to as that makes more sense.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-19 18:23:10 +00:00
David Reid ca91310a67 Start the change to using beos style interrupt handlers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-19 16:00:17 +00:00
David Reid 5636ab73b0 Remove some now uneeded error codes. By removing these I'm hoping
people will start to migrate to the posix/Be error codes and thus
remove the possibility of mismatched codes being reported/checked.

Think this change should cause no build problems, but it's possible
I missed one or 2 instances...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-19 01:39:33 +00:00
David Reid 45fcd51d6a Start adding a new hash implementation. the new code is basically that
that the net stack used but works in a different way than the existing code,
and has proved useful in the modules code where it cured the strange
segfaults that were being produced in seemingly random and unpredictable
places.

the naming could be improved :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-19 01:25:33 +00:00
Axel Dörfler ba94874630 Added a fs_get_vnode_name() call for the file systems.
Fixed a header dependency in sem.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-18 20:51:27 +00:00
Axel Dörfler bc934681ba Implemented geist's recent change to mutexes - they are now no longer
benaphores; benaphores aren't that beneficial in kernel land, the benaphores
are a way to reduce the number of kernel calls.
They can now only be released by the same thread who originally acquired it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-18 19:22:17 +00:00
Axel Dörfler 2b5d1dc418 Added the preliminary ASSERT() macro from NewOS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-18 18:45:07 +00:00
Axel Dörfler 4635c565e4 Added the arch_cpu_idle() call.
Updated stage2_priv.h to reflect geist's, and freston's changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-18 14:15:47 +00:00
lillo 0ba337c0a4 adding environmental variables support
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-18 13:59:03 +00:00
Philippe Houdoin 3b333c3bd1 dbg_add_command() changed into BeOS compatible add_debugger_command().
remove_debugger_command() added.
Fix cmd_gdb() prototype according to new debugger command one.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-17 22:10:34 +00:00
Axel Dörfler cbe085bc5a Forgot some debug stuff...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-17 08:12:41 +00:00
Axel Dörfler b79d207dc2 user|sys_seek() now returns an off_t.
Changed the fd_close() call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-17 08:01:40 +00:00
David Reid e927084dbf This is now in another header file and so not required here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-14 14:52:28 +00:00
Axel Dörfler eba8b6cfb9 Next update of the VFS: more posix like open/create; divided create in
sys_create(), and sys_create_dir(), open in sys_open(), and sys_open_dir().
Small cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-14 05:08:26 +00:00
David Reid 6b3dbd281b drivers.h -> Drivers.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-12 23:28:12 +00:00
David Reid 5f79d3a87b drivers -> Drivers...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-12 23:26:20 +00:00
David Reid 03b2717394 We have iovec's now and add the api version define.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-12 20:20:37 +00:00
David Reid f16873a60e OK, final change to error codes for a while I hope.
- remove private/kernel/Errors.h as this was just plain wrong to have it
  there and confused issues somewhat.
- add the kerrors.h file that has kernel only error codes, namely the
  ERR_ codes from newos.
- add comments for the other header files to tell people where to find
  error code definitions in an attempt to stop people getting lost!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-11 22:17:09 +00:00
David Reid d69c1d7983 Move errno.h to it's correct place
Adjust Errors.h to use errno.h for the posix error codes
add first stab at limits.h, albeit not using the gcc headers at
present for intel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@88 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-11 20:39:30 +00:00
Axel Dörfler f8d7610714 Added the syscalls for sys_read_dir(), and sys_rewind_dir().
sys_read_dir() now has a parameter for the maximum number of dirents that
are handled by the upper layer - which is currently 1.
Added a comment in fd.h to ease the location of the sys|user prototypes
of the corresponding functions in fd.c.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@58 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-10 21:46:34 +00:00
David Reid 48535f1870 offsetof, insque and remque can be used throughout the kernel,
so move their definitions here.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@35 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-10 13:17:22 +00:00
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00