Commit Graph

899 Commits

Author SHA1 Message Date
Tyler Dauwalder
a03a04e027 - Added/moved ddm string-length and buffer-size constants to DiskDeviceDefs.h
- Converted all uses of B_{FILE,OS}_NAME_LENGTH in ddm_userland_interface.cpp
  to appropriate ddm constants.
- Made module names B_PATH_NAME_LENGTH long.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-28 00:13:11 +00:00
Tyler Dauwalder
937144690c Made disk device type strings B_FILE_NAME_LENGTH long, and fixed
a few partition name constants that hadn't been changed from B_OS_NAME_LENGTH.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-27 22:45:15 +00:00
Tyler Dauwalder
e176a055ac Added max parameter-string buffer-size limit of 32KB.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-27 08:10:52 +00:00
Tyler Dauwalder
de5a94dbc6 - Updated partition name and partition content name length limits
to B_FILE_NAME_LENGTH.
- Added partition [content] name copy-out code to
  _kern_validate_{set_partition_name,set_partition_content_name,
  intialize_partition}.
- Added parameter security to _kern_supports_moving_partition().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-27 07:28:55 +00:00
Waldemar Kornewald
cdc2ad89b1 Changes for kernel land (added set_sem_owner and kernel_cpp.h/cpp).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-25 13:24:59 +00:00
Tyler Dauwalder
229c00c5a7 - Added parametersSize param to all functions taking a parameter string.
- For functions where name strings are both input and output parameters that
  may be truncated if too long, updated copy-in procedure to allow truncation
  without returning an error.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-25 08:35:27 +00:00
Tyler Dauwalder
8768d15c6e - Fixed lack of proper error code checking on calls
to user_strlcpy()
- Changed all remaining instances of SYS_MAX_PATH_LEN
  to B_PATH_NAME_LENGTH.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 23:09:43 +00:00
Axel Dörfler
8da0ad81bf Removed rtc_set_system_time() and introduced the public Be kernel call
set_real_time_clock().
I am not sure if this call is supposed to set the hardware clock.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 14:53:02 +00:00
Axel Dörfler
60f9bd4a57 Adds an empty arch_real_time_clock.c for the PPC build. The Pegasos may
need the same RTC code as x86 (but using the ISA bus manager instead of
in/out).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 12:38:07 +00:00
Axel Dörfler
d7f7d209ed Renamed the global secs_per_month[] to sSecsPerMonth[] and made it static.
Added a comment about how to make computing the seconds passed since 1/1/1970
more efficient.
Some slight other changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 12:24:10 +00:00
Axel Dörfler
05ca50f27d Fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 12:09:20 +00:00
Axel Dörfler
f328aeecb6 Applied our style guide.
Commented the debug welcome message in rtc_init().
Moved the seconds per year calculation into a separate function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 12:01:25 +00:00
Axel Dörfler
2218f79ede Added real-time clock support written by Jeff Ward (for the kernel).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 10:21:10 +00:00
Tyler Dauwalder
27b54f4499 Finished up most of remaining kernel-saftey stuff, and fixed previously "safe" code that accessed userland memory directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 09:37:20 +00:00
Tyler Dauwalder
0d2558589a Added platform specific boot headers to search path for libdisk_device_manager.so, as ddm_userland_interface.cpp apparently needs them now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 09:36:15 +00:00
Axel Dörfler
f5ab9c12ce Fixed arch_cpu_global_TLB_invalidate() - it only invalidated the first
256K of the available address space.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 03:39:47 +00:00
Axel Dörfler
622405014e The init routine doesn't have to make sure that the IP bit of MSR is
set since the boot loader already takes care of that.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 03:38:39 +00:00
Axel Dörfler
6f634c19b6 Fixed a potential overflow bug in ppc_set_page_table().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 03:37:15 +00:00
Axel Dörfler
c72672b624 Made the computation of the page table hash mask easier to read.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 03:36:22 +00:00
beveloper
ca16f5cb03 start of media kit codec plugin API
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 23:55:19 +00:00
Axel Dörfler
b912581792 new_file_system() returned a status code, but should have returned
a pointer to the file system.
Renamed all static g* variables to s*.
Renamed "mount_id" fields to the higher level "device" (to be able
to compile the file).
Fixed all casting warnings.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 14:47:15 +00:00
Axel Dörfler
9559a50771 Renamed vfs.c to vfs.cpp to prepare and ease working with the disk
device manager (and have more warnings).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 14:45:07 +00:00
Axel Dörfler
bd77051dc3 Changes due to renaming of vm_translation_map_get_pgdir() to i386_*().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 14:35:29 +00:00
Axel Dörfler
7221a58854 Fixed some warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 14:05:05 +00:00
Axel Dörfler
4ef2438290 Fixed a warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 14:01:16 +00:00
Axel Dörfler
f8e89e479d Adoption of Travis' PPC code. Changed to our VM structures and slightly
different arch-specific CPU functions. Fixed some bugs. Not tested.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 13:57:28 +00:00
Axel Dörfler
14d9cc14d9 Updates caused by renaming vm_translation_map_get_pgdir() to
i386_translation_map_get_pgdir().
Fixed some warnings.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 13:47:12 +00:00
Axel Dörfler
61897ef2b1 Stub implementation no longer needed, real implementation will be C++.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 13:06:24 +00:00
Axel Dörfler
3b912ee405 Stub implementation no longer needed, real implementation will be C++.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 13:00:07 +00:00
Axel Dörfler
112bea4bac Added the arch_cpu_sync_icache() function for x86 from NewOS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-17 12:54:34 +00:00
Axel Dörfler
35270fa7d4 Removed unused makefile.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:42:38 +00:00
Axel Dörfler
b858732b90 Fixed a scoping bug in the elf_load_kspace() function (non-critical under
normal circumstances, though).
Updated the comment why we have to create the read-only segment as read-write.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:28:10 +00:00
Axel Dörfler
7a17e3aeea Some fixes because of the elf32.h header cleaning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 17:56:05 +00:00
Axel Dörfler
b8be90d5fb Now works with GCC 3 as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-12 00:46:30 +00:00
Axel Dörfler
aaaceca81b Added more CPU functions, fixed the get_sr() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-11 19:00:59 +00:00
Axel Dörfler
e2367e8fcb Added some PPC helper functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-08 01:24:01 +00:00
Axel Dörfler
c8ec205b7b Include kernel_args.h instead of stage2.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 23:12:37 +00:00
Axel Dörfler
b55d9c74f1 Renamed fields of the kernel_args structure.
Commented out the page_daemon to remove a warning.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 23:09:21 +00:00
Axel Dörfler
33dc59abd3 Don't include the isa bus_manager when compiling on PPC.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 21:51:48 +00:00
Axel Dörfler
c12bec104e Did not compile before.
Fixed some style issues.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-06 02:04:53 +00:00
beveloper
5a40812eab removed bus manager
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 16:57:53 +00:00
Axel Dörfler
20b82fcf5b Minor change: corrected the debug output in wait_for_thread().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:38:00 +00:00
Ingo Weinhold
283e146548 Aesthetical change.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 21:45:22 +00:00
Ingo Weinhold
58b7de1cda Implemented the resize job.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 21:44:47 +00:00
Ingo Weinhold
b0814f61c3 Implemented Resize() and ResizeChild().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 21:44:21 +00:00
Ingo Weinhold
77fe5e61a5 Another fix of the code that updates which partitions are still busy. Hopefully the last one.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 21:43:59 +00:00
Ingo Weinhold
541c05cc85 We always resize the partition contents.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 21:43:11 +00:00
Ingo Weinhold
3acc9a051b Moved the validation functions out of ddm_userland_interface.cpp into ddm_operation_validation.{cpp,h} for re-use.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 21:40:36 +00:00
beveloper
90157e6a02 Removed bus_man.c from build since it no longer compiled after removing pci_bus.h :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 19:57:14 +00:00
Ingo Weinhold
6c27ff9492 Define some macros telling us, that we compile for R5 and userland.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-29 18:47:10 +00:00
Ingo Weinhold
11ef678c43 We don't need to mark/unmark shadow partitions busy separately anymore, since they should automatically remain in sync with the physical ones.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 22:06:54 +00:00
Ingo Weinhold
2998edc39b Added KPartitionListener.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 22:04:37 +00:00
Ingo Weinhold
58bdbab626 Added a KPartition listener mechanism and made use of it to keep shadow partitions with the corresponding physical ones in sync.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 22:04:13 +00:00
Ingo Weinhold
373c8e3751 Implemented Do(). Looks like it works.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 19:33:23 +00:00
Ingo Weinhold
0ee064b1fb KPartition::UninitializeContents() returns an error code now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 19:31:49 +00:00
Ingo Weinhold
bce1e50726 Some fixes concerning job queue handling.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 19:30:57 +00:00
Ingo Weinhold
70f0555bce Debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 19:30:12 +00:00
Ingo Weinhold
583f8c1d02 Added set_disk_device_job_error_message() for setting an error message, when an error occurs while executing a job.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 19:29:36 +00:00
Ingo Weinhold
ac8b60ce67 Added setter/getter for an error message. Should be set to something informative when while executing a job an error occurs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 19:28:27 +00:00
Ingo Weinhold
69cb08c01c UninitializeContents() returns an error code now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 19:26:18 +00:00
Ingo Weinhold
ccb29adbec Fixed (and documented) _kern_get_disk_device_data(). It is now properly relocating the disk device data.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 15:16:42 +00:00
Ingo Weinhold
f3a589c2ce Added support for relocation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 15:15:20 +00:00
Ingo Weinhold
752ad410c3 Made the disk device manager stuff compilable again. Doesn't link yet, since user_memcpy() and user_strlcpy() are still missing in kernelland_emu.cpp. Tyler?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 00:43:40 +00:00
Ingo Weinhold
d3f24d18b6 Added missing return.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-28 00:41:19 +00:00
Ingo Weinhold
867d3753c3 Wrong data were copied back to the userland cookie in user_get_next_port_info().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-27 11:37:09 +00:00
Tyler Dauwalder
453ee0db01 Updated user_read_link() to return the same values it used before the
user_strlcpy() return value semantics change.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-27 05:29:04 +00:00
Tyler Dauwalder
702b8e7ed9 Made first half of so of ddm syscalls kernel-safe.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-27 05:19:37 +00:00
Tyler Dauwalder
2f0734d8ec Included kernel headers in search path for ddm.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-27 05:14:58 +00:00
Tyler Dauwalder
1eebd1e00a Updated user_strlcpy() to return length of source string instead of 0.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-27 05:14:22 +00:00
Ingo Weinhold
bc2d9db133 Creates resize and uninitialize jobs now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-22 22:04:03 +00:00
Ingo Weinhold
6a2a273d12 Aesthetical changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-22 21:46:48 +00:00
Ingo Weinhold
032e49d571 Partially implemented the class. Well, save the entirely unimportant Do() method, which prints only some debug output for now. ;-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-22 21:46:00 +00:00
Ingo Weinhold
f7779c94eb Some important fields weren't cloned from the physical partition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-22 21:44:19 +00:00
Ingo Weinhold
aa915a05bd Joined the methods generating the delete child and uninitialize jobs -- otherwise we'd delete children of partitions that are uninitialized. Fixed several small bugs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-22 21:43:13 +00:00
Ingo Weinhold
557cfcdb26 Carried out a incredibly complex TODO. :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-21 21:28:30 +00:00
Ingo Weinhold
6e855f0317 Removed the resizeContents/force from the resize/move syscalls. Fixed resize/move related bugs (partition was not check for status uninitialized).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-21 21:26:12 +00:00
Ingo Weinhold
dafaf4c360 Added IsUninitialized() convenience method.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-21 21:21:10 +00:00
Ingo Weinhold
50e3477b70 Added KUninitializeJob. Does nothing but printing debug output for now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-21 21:20:27 +00:00
Ingo Weinhold
20c33ce79b Added syscall for uninitialization.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-21 19:13:54 +00:00
Ingo Weinhold
5c699c6735 Add a field mount_cookie to the partition_data structure and
respective setter/getter methods to the KPartition class.
If a partition is mounted, the field will contain the cookie the
FS's mount() hook passed back to the VFS. This way the FS has
access to its internal data structures. We need the cooperation
of the VFS to get the cookie.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-21 18:25:42 +00:00
shatty
b89786b69e change to public resource.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-20 20:47:27 +00:00
beveloper
591d950f92 removed building of old pci module
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-17 20:32:45 +00:00
Axel Dörfler
75352278ce Fixed the build when DEBUG was defined: thread_wait_on_thread() is now
called wait_for_thread().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 20:49:01 +00:00
beveloper
8a3b6e2cfd fixed warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 20:44:45 +00:00
Axel Dörfler
b5a05a72fa Fixed some warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-09 02:36:52 +00:00
Axel Dörfler
d02898ade8 list.h is now in util/.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-09 02:36:29 +00:00
Axel Dörfler
e4cf172727 Since Ingo found out that BeOS requires the module name and its location
on disk to match to be able to find it, changed the ToDo: comment in the
affected function, and added a test call to vfs_get_module_name(); our
bootfs cannot handle the path depth/length required to be a useful module
host, so we still have our recursive search algorithm in place for now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 04:06:14 +00:00
Axel Dörfler
ad304a7ef7 Implemented a new vfs_get_module_path() call that returns the module path
of a given module name.
vnode_path_to_vnode() can now return the type of the file, changed the parameter
order.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 04:02:34 +00:00
Axel Dörfler
dbb3d1fc5b Fixed some warnings.
Added a comment about how to traverse the module path to find a given module -
could well be that we got that wrong (too loose, it will work perfectly, though,
just slower than it could be).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-06 17:35:05 +00:00
Axel Dörfler
080cec2518 Fixed a warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-06 17:31:33 +00:00
Axel Dörfler
e12302da4b Fixed a couple of warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 04:23:16 +00:00
Axel Dörfler
a7d21bad55 Fixed some warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 04:20:42 +00:00
Axel Dörfler
db310cf12e Added internal syscalls for fs_read_info() and fs_write_info().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 04:19:24 +00:00
Axel Dörfler
73d330cf0a Added some missing index functions, and ifdef'd them out, since that
functionality might not be accessible for R1.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 04:07:39 +00:00
Axel Dörfler
ad20736f2d Introduced new get_mount()/put_mount() calls to protect a volume against
"sudden unmounts" (as far as that can work). This replaces the weak
find_mount() call used at several places in the fs index functions.
Fixed a bunch of warnings, mostly unused prototypes and variables.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 04:01:25 +00:00
Axel Dörfler
854c22e257 Removed an unused function.
#ifdef'd a variable that's only of use with TRACE() on.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 03:29:13 +00:00
Axel Dörfler
99f9554253 Removed an unused variable.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-02 13:08:48 +00:00
Axel Dörfler
a6a723ebea Moved list.c into the util/ subdirectory and build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-02 13:07:22 +00:00
Axel Dörfler
20743a3a67 KPartition::Dump() now also writes its size in MB for convenience (makes it
easier to check if the partitioning_system returns the correct size :-)).
Uses %f which doesn't work in the BeOS kernel (but might in OpenBeOS).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-02 04:06:01 +00:00
beveloper
188b5de0bf renamed atomic_read() into atomic_get() (since we already have atomic_set(), but not a atomic_write())
renamed user_??? functions into the new _user_??? naming style.
changed implementation of PPC 64 bit atomic functions to use (un)lock_memory()


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-31 01:21:56 +00:00
beveloper
5fe840b9b5 fixed address checking in ppc atomic functions.
fixed compilation on x86.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-21 23:36:06 +00:00
beveloper
50e0ce4bee Implemented new syscalls for 32 and 64 bit atomic operations.
They are only used if the architecture doesn't support them directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-21 23:02:00 +00:00
Axel Dörfler
8655936935 Replaced some more vm_*() calls with BeOS compatible ones.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 15:55:56 +00:00
Axel Dörfler
0fd7b49819 Added/changed VM syscalls to the BeOS compatible ones.
Reordered the syscalls a bit (in functional groups), not completely, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 15:52:58 +00:00
Axel Dörfler
fc3874cf13 Replaced the vm_get_region_info() call with get_area_info().
Removed the user_vm_get_region_info(), and user_vm_clone_region() calls.
Added all missing BeOS compatible area syscalls.
Partially implemented [_user_]find_area(), implemented _user_area_for().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 15:51:30 +00:00
Axel Dörfler
b98ed81007 Made the VM even calmer - this one uses the TRACE() stuff now as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 03:21:13 +00:00
Axel Dörfler
5e809fa13e Added empty stubs for all missing BeOS VM functions.
The lock_memory()/unlock_memory() functions cannot be implemented right
now, as the NewOS VM doesn't support locking.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 03:07:51 +00:00
beveloper
40ac5c5195 cvs server: Up-to-date check failed for `src/kernel/core/vm/vm.c'
cvs [server aborted]: correct above errors first!
cvs commit: saving log message in /tmp/cvsFPtfaj


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:48:15 +00:00
Axel Dörfler
44e874a74d Made the VM a lot calmer if you wish; moved many dprintf()s into the new
TRACE() macro. Renamed the old TRACE macro to TRACEPFAULT.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:41:07 +00:00
beveloper
5f993f93ff renamed test_and_set into atomic_test_and_set
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:35:24 +00:00
beveloper
b4e05c0eb8 On most systems, atomic functions do not need to be implemented as syscalls.
ATOMIC_FUNCS_ARE_SYSCALLS is only defined on architecture like SH4.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:34:42 +00:00
beveloper
2fdb794edc The atomic and system_time function are now included in the
kernel_os_arch_x86.o file that is genereated by libroot.
Removed duplicate implementations from this file.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:23:44 +00:00
beveloper
67fd74cd28 moved atomic user functions to SH4 atomic.c
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:21:57 +00:00
Axel Dörfler
414ecbd490 Now uses the BeOS map_physical_memory() call.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:17:09 +00:00
Axel Dörfler
fac37b22cb Added the BeOS compatible and working map_physical_memory() call.
Made the "name" argument const for create_area_etc() and vm_map_physical_memory().
Moved some common conversion code (BeOS to NewOS VM constants) to separate
functions to clean them up a bit.
create_area() now automatically sets LOCK_KERNEL if the area is to be created
in kernel space (as I would guess BeOS does, too).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:14:44 +00:00
beveloper
74aad02bac SH4 needs atomic operations to be implemented as syscalls, other
architecture can do this better. Removed from generic cpu.c file.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:13:45 +00:00
Axel Dörfler
f8a4dcfa28 Forgot about B_ANY_KERNEL_BLOCK_ADDRESS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 22:29:51 +00:00
Axel Dörfler
c4aff5f858 Now uses delete_area() instead of vm_delete_region().
Temporarily #if'd out scan_pci() and removed the compiler calming hack for it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 17:47:20 +00:00
Axel Dörfler
cbc1309c68 Replaced some more vm_create_anonymous_region() with create_area() and
create_area_etc().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 17:38:13 +00:00
Axel Dörfler
5152eb6890 The delete_area() call in the kernel now only allows to delete areas created
in the kernel.
Use the new delete_area_etc() call for other needs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 17:21:50 +00:00
Axel Dörfler
b2e5e9af2d As the BeOS documentation states what will happen in the future,
delete_area() now only allows to delete areas you have created
yourself before from userland, again.
The kernel's delete_area() still allows everything, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 17:08:35 +00:00
Axel Dörfler
010a1e70be Made the delete_area() function BeOS compatible; it now allows any area to
delete. Added a comment how the security should be improved by adding another
restriction.
Also mentioned that it's probably a bad idea that vm_delete_region() will
not wait until the region has been freed, but just "mark" it as to be freed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 14:47:31 +00:00
Axel Dörfler
7b25ddd21a Replaced calls to vm_create_anonymous_region() with the BeOS compatible
create_area() where possible.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 14:28:11 +00:00
Axel Dörfler
50ba6835f7 Replaced old create/delete area syscalls with the new ones.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 14:10:35 +00:00
Axel Dörfler
20fcd813b9 Implemented BeOS compatible create_area()/delete_area() calls for the VM
that will call the internal vm_*() calls. This will make it easier to just
drop in another VM.
Also (partially - Ingo was faster) introduced the new syscall naming scheme
_kern_ & _user_ prefixes to them into the system namespace, and no longer
clobber the application namespace.
Removed the now unused user_vm_create_anonymous_region() call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-19 14:06:13 +00:00
Axel Dörfler
650a32fb62 Fixed two very subtle and hidden bugs that prevented the module component
to work at all: recurse_directory() always returned failure, no matter what opendir()
returned (one semicolon too much), create_module() allocated only 4 bytes for
the module - sizeof(module) referred to the variable, not the structure name...
(the unfortunate consequences of the naming scheme I otherwise like very much -
it "just" took me 3 hours to hunt both bugs down).
Added some TRACE() and ASSERT()s.
Added a new debugger command "modules".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-18 03:41:26 +00:00
Axel Dörfler
54711c1b89 free() now fills the freed memory with 0xdeadbeef if PARANOID_KFREE is defined
(except for the first 4 bytes, because that's the pointer to the next buffer
in the free list).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-18 03:35:57 +00:00
Axel Dörfler
782a460588 subtle cleanup, debug output corrections.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-18 03:21:26 +00:00
Ingo Weinhold
00e2926fda Uses a free list of semaphore slots for faster creation now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-04 00:06:54 +00:00
Ingo Weinhold
d40ced0e2e Fixed a few smaller issues.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-03 22:21:00 +00:00
Ingo Weinhold
8d91b8087d Improved the interaction between job queue and manager. Partitions should now be mark busy correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-03 18:39:12 +00:00
Ingo Weinhold
13ab290504 Fixed a potential memory leak. If any operation prior to the addition of the job queue to the manager failed, it wouldn't be deleted. Now the job generator deletes it by default and must be told via DetachJobQueue() to not do that.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-03 18:37:21 +00:00
Ingo Weinhold
cc6edbdf8f * Added VisitEachDescendant().
* Added {Add,Clear}Flags() which are more comfortable than SetFlags() in
  most cases.
* On construction the `busy' and `descendant busy' flags are set.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-03 18:27:33 +00:00
Ingo Weinhold
7e4c7d4350 Added KPartitionVisitor class used for advanced partition tree traversal.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-03 18:23:53 +00:00
Ingo Weinhold
572b5b77d3 Implemented _kern_commit_disk_device_modifications() (save the notification related part).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-02 00:01:37 +00:00
Ingo Weinhold
af314d827a Implementing generation of remaining jobs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-02 00:00:49 +00:00
Ingo Weinhold
84ba3a5265 Added JobFactory().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-01 23:59:26 +00:00
Ingo Weinhold
1217079c31 Changed parameter name only.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-01 23:58:46 +00:00
Ingo Weinhold
a10abc1e14 Added KDiskDeviceJobGenerator.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 22:48:51 +00:00
Ingo Weinhold
bdbbcfaf16 Added CountDescendants().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 22:48:08 +00:00
Ingo Weinhold
ec4ef3525f Added a KDiskDevice* parameter to the constructor.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 22:46:38 +00:00
Ingo Weinhold
57c8af057e Replaced the Vector parameter of CreateMoveJob() by a simple array. Added CreateUninitializeJob() (empty implementation).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 22:45:26 +00:00
Ingo Weinhold
6ae0077c0d This class compares a KDiskDevice with its shadow partition hierarchy and
generates the jobs needed to transform the former to the state of the
latter. Currently only the jobs for deleting partitions and resizing
and moving existing ones are generated. Resizing and moving was the
hard part, though, the rest should be much easier. Completely untested
yet.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-31 22:41:50 +00:00
Ingo Weinhold
78097103b7 Turned off debugging. Now sets the job description.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 17:51:01 +00:00
Ingo Weinhold
68f12c0221 Implemented job related functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 17:49:50 +00:00
Ingo Weinhold
fe05b0ac95 Added and implemented job related syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 17:48:08 +00:00
Ingo Weinhold
c34b4f49f4 Added ActiveJobIndex().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 17:46:59 +00:00
Ingo Weinhold
4f2af97d45 Implemented class. Some bits are still missing (e.g. setting the description).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 00:29:03 +00:00
Ingo Weinhold
71346466b8 Added user_partition_data::content_size field. Small change to support a NULL parameter in _kern_supports_resizing_partition().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 00:24:22 +00:00
Ingo Weinhold
738e4a700b Support for the added partition content size attribute.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 00:21:21 +00:00
Ingo Weinhold
ace55d9bfc Implemented the job related functionality. Moved scanning of partitions into the respective job class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 00:18:16 +00:00
Ingo Weinhold
6eaec7ddda Some changes to the interface (added missing methods and such). Implemented the class almost completely. Basically only the notification stuff is still missing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 00:16:15 +00:00
Ingo Weinhold
a31533cbec Brought the interface up to date. Added empty implementations for all methods, save the one creating a job for scanning, which is complete.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 00:14:27 +00:00
Ingo Weinhold
38bd13fcf9 Some changes to the interface. Implemented most of the methods. The notification stuff is still missing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-30 00:12:39 +00:00
Axel Dörfler
1baf26bc47 Fixed allocate_cbuf_mem() after Ingo's hints. The CBUF_FLAG_CHAIN_HEAD flag is
now no longer set in the loop, the total_length calculation should now be correct.
The CBUF_FLAG_CHAIN_TAIL is now set for the lastBuffer instead of buffer.
Removed some superfluous lines in cbuf_get_ptr(), and cbuf_ones_cksum16().
Fixed the buffer->length calculation in cbuf_truncate_tail() and added some
comments about the correctness of the code - should be investigated and fixed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-26 13:58:20 +00:00
Ingo Weinhold
95152e1e98 Implemented remaining partition modification syscalls. Some small fixes. Some refactoring.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-24 22:58:06 +00:00
Ingo Weinhold
1d8675355f Added some more support for tracking changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-24 22:56:53 +00:00
Ingo Weinhold
ee1ebe375c * Added ShadowPartitionChanged() to KDiskSystem and respective hooks
to the module interfaces. So the disk system will be informed, when a
  shadow partition has changed and it is allowed to do necessary
  adjustions (e.g. adjusting the cookie, the parameters, or on
  partitioning system initialization even creating special child
  partitions (apple partitioning system)).
* Added `int32 *index' parameter to ValidateCreateChild(). So the
  partitioning system can report at which index the new child shall be
  inserted.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-24 22:53:23 +00:00
Ingo Weinhold
5ee968b3df * Added a change counter parameter to all partition querying and
modification functions. Don't know why I didn't right from the start.
* Implemented _kern_resize_partition().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-22 00:11:03 +00:00
Ingo Weinhold
02885b7d6e * Got rid of SetContentType(). It is set automatically now, to the
PrettyName() of the responsible disk system.
* Added change counter support and changes tracking.
* Added UninitializeContents().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-22 00:03:35 +00:00
Ingo Weinhold
c0b8ba64fd _kern_supports_moving_partition() now returns the list of partitions that need to be unmounted for moving.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-21 14:17:03 +00:00
Ingo Weinhold
df3b8c625e Added partition modification syscalls with empty implementations.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-20 22:39:37 +00:00
Ingo Weinhold
d7ce4fddfc Implemented all read-only (more precisely: not writing) methods. Small changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4034 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-20 17:24:32 +00:00
Ingo Weinhold
71a5281923 Implemented _kern_get_partitionable_spaces(). Got rid of user_partitionable_space_data.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-20 17:18:48 +00:00
Ingo Weinhold
2a596c013a Implemented all read-only (more precisely: not writing) methods. Small changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-20 17:15:35 +00:00
Ingo Weinhold
752cec6459 Several changes to the _kern_{supports,validate}_*() calls:
* Removed the disk_system_id parameter where superfluous.
* Got rid of the `child' variants of the _kern_{supports,validate}_*()
  syscalls for moving and resizing. Reimplemented the real ones to do the
  the right thing, i.e. they check all concerned disk systems now.
* Added _kern_supports_setting[_content]_parameters().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-19 20:37:00 +00:00
Ingo Weinhold
708a31badf Added SupportsSetting[Content]Parameters() to the KDiskSystem interface and respective functions to the module interface. Some re-ordering of methods/functions for aesthetical reasons. :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-19 20:29:58 +00:00
Ingo Weinhold
24fa6c601b Added LoadDiskSystem() version, that takes a disk system name.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-19 20:26:48 +00:00
Ingo Weinhold
18b90323d9 Added flags for disk systems.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4009 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-18 18:41:21 +00:00
Ingo Weinhold
a1a7d37e2c Added syscall for validating the initialization parameters.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-17 00:04:22 +00:00
Ingo Weinhold
3f60a01369 Added "name" parameter to KDiskSystem::[Validate]Initialize() and the respective module API functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3999 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-17 00:03:17 +00:00
Ingo Weinhold
8bc0bd912a Added and implemented the remaining disk system syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-16 21:01:14 +00:00
Ingo Weinhold
1f3f1294a8 Added a IsSubSystemFor() method to the KDiskSystem interface and respective calls for the module interfaces.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-16 21:00:01 +00:00
Ingo Weinhold
1863de6785 Added and implemented the first part of the disk system querying syscalls (_kern_supports_*()).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-15 21:42:59 +00:00
Ingo Weinhold
0fbb290f51 Some changes to/fixes of the KDiskSystem interface and the disk system module interface.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-15 21:41:32 +00:00
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
1ff134b901 * 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()),


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-15 01:27:43 +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
7dd03a026b Renamed KDiskDeviceManager::DiskSystemWith{ID,Name}() to FindDiskSystem().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-08 23:24:47 +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
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
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
b74cd4c9d1 Little helper class for writing the disk device/partition data into a buffer for userland.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-06 22:53:20 +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
2091bd588f Replaced usage of List template class by the kernel utils Vector.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-02 16:38:29 +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
Axel Dörfler
43e64c6219 The cbug memcpy functions now accept a NULL pointer to a chain - and return
B_BAD_VALUE instead of just crashing in this case.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-01 00:05:27 +00:00
Axel Dörfler
33aae10b67 The pipe now buffers incoming packets when there is no reader waiting in
a chained buffer provided by cbuf.
Only select support is missing now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3736 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-29 18:29:36 +00:00
Axel Dörfler
d98326b49f Removed some useless calls to get_sem_count().
Moved set_port_owner() around.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-28 16:53:36 +00:00
Axel Dörfler
9163395ef6 read_port_etc() could pass PORT_FLAG_USE_USER_MEMCPY to acquire_sem_etc().
Small cleanup of {read|write}_port_etc().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-28 16:46:07 +00:00
Axel Dörfler
2469f26dfc Implemented the basic hand-shaking mechanism; direct data exchange is
now working, but everything that would have to be temporarily buffered
is discarded right now (will use cbufs for this).
Pipes can now actually be created and removed - this didn't work before.
Changed some lock types to better suit their needs.
Small fixes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-28 04:38:04 +00:00
Axel Dörfler
9a7bfe0ec1 Added minor debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-28 04:23:24 +00:00
Axel Dörfler
f0df28e20e Now makes use of C++ features, still no reading or writing, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 23:04:36 +00:00
Axel Dörfler
2aa93388f3 C++ for the kernel added to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 23:03:45 +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
Ingo Weinhold
cbbec57f71 Oops, our TOP is named OBOS_TOP.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 17:38:12 +00:00
Axel Dörfler
9d1b8268b8 Removed unused headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 16:53:33 +00:00
Axel Dörfler
c05acf62ee Big cleanup of the cbuf implementation to fit better into our style guide.
Renamed cbuf_get_len() to cbuf_get_length().
Fixed a bug in cbuf_get_length() that would have returned an error code in
a size_t (now returns 0 in that case).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 16:42:31 +00:00
Axel Dörfler
ebb226d544 Removed now unused headers (prototypes are now in builtin_fs.h).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:50:26 +00:00
Axel Dörfler
87357f1456 Added the pipefs to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:49:31 +00:00
Axel Dörfler
ba6ecd2852 Removed unused headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:49:13 +00:00
Axel Dörfler
e189e20f7e Simplified the vnode creation procedure.
Removed unused headers. Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:48:32 +00:00
Axel Dörfler
ecb21fa760 Now bootstraps the pipe file system.
Updated due to recursive_lock_init() change.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:46:27 +00:00
Axel Dörfler
5843ebfbda Added very basic pipefs implementation - only handles files right now
(creation, deletion), no reading/writing allowed (or even started),
no select support.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:44:28 +00:00
Axel Dörfler
91caecf659 Now gives its tm rlock a name - note, this doesn't check the return code
of this function!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:28:12 +00:00
Axel Dörfler
a5bc38081e Will no longer fail if the recursive_lock couldn't be created - that does
*not* change the previous behaviour (well, I added some debug output), since
the former recursive_lock_create() did always return B_OK, no matter if the
lock could be initialized or not.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:27:12 +00:00
Axel Dörfler
783f7b5ccd Now gives its recursive lock a name and checks its return code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:25:24 +00:00
Axel Dörfler
b652f04990 Removed the pools.c file from the build, since it's a) not used anymore,
and b) doesn't compile due to the latest lock changes (see lock.c 1.7).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:24:37 +00:00
Axel Dörfler
68fe151fb9 Fixed the return code of recursive_lock_init() (formerly known as
recursive_lock_create()) - this reveals bugs in other parts of the system (VM),
but those won't be fixed for now (because of VM2).
Added the possibility of giving a recursive lock a name.
Moved the functions for benaphores and rw-locks to this file (they were
part of the lock.h header as defines).
Removed unused headers.
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-27 03:22:57 +00:00
Ingo Weinhold
7eb12758ed * Fixed the locking functions: A lock also requires a reference to be
kept.
* Fixed find_{disk_device,partition}().
* Implemented delete_partition(). The device/partition management functions
  should now be complete.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-25 00:04:55 +00:00
Ingo Weinhold
86e8beea7d Added boolean parameter to IsReadLocked() to specify when a write lock shall not be considered as read lock.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-25 00:00:34 +00:00
Ingo Weinhold
eba400a809 We need the virtualdrive header for the file disk device stuff.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-24 23:58:25 +00:00
Ingo Weinhold
f5650b0a07 No real change. Added and removed debug output. :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-24 23:57:33 +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
Ingo Weinhold
6ab18748f3 Removed invocations of UsePublicHeaders, which was a no-op anyway.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-23 16:53:22 +00:00
Ingo Weinhold
24d57dc067 Added KFileDiskDevice and the file with the disk device type strings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-22 23:28:04 +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
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
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
Axel Dörfler
7862de2e87 Removed the old driver_settings.c file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-15 13:22:50 +00:00
Axel Dörfler
3e758cd63f Removed the core/driver_settings.c from the kernel build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-15 13:13:24 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1da55179ee thread_exit() now removes the registered images when the team goes down.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:30:09 +00:00
Axel Dörfler
c8019cad42 Added support for the image queue in the team structure.
Adapted because of changing structure names (struct uspace_program_args).
Added comments, fill_team_info() now sets the team_info.image_count correctly.
Some cleanups and style changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:29:28 +00:00
Axel Dörfler
75dccdb63c Added the image API syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:27:03 +00:00
Axel Dörfler
598e865517 Added image.c to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 16:26:39 +00:00
Axel Dörfler
515a4a6590 Implementation of the kernel part of the image API.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 15:58:08 +00:00
Ingo Weinhold
4a05764e4b Some smaller changes concerning the scanning of the settings file to make it behave more like BeOS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-12 14:42:09 +00:00
Axel Dörfler
4fff689f48 Some minor updates:
arch_cpu: could have used the TLS_SIZE macro in one place, removed
a now unused variable, assignments to tss_loaded are now booleans.
thread.c: added the new fields to _dump_thread_info().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-08 09:27:55 +00:00
Axel Dörfler
20726b7fb1 _create_thread() now correctly allocates the stack with REGION_ADDR_EXACT_ADDRESS
from the USER_STACK_REGION (until B_BASE_ADDRESS is available), made it much better
readable. It now grows from the lower USER_STACK_REGION up to the start of the main
thread's stack location.
Calls arch_thread_tls_init() and accounts for the TLS area in the stack region.
Added some comments, some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:48:01 +00:00
Axel Dörfler
59cbb92fdf team_create_team2() now also allocates a region for TLS in the primary stack
area. It now also calls arch_thread_init_tls(). Cleaned it up to make it more
readable, added some comments.
Some other cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:40:59 +00:00
Axel Dörfler
2a6fbb7f88 Removed some hard-coded values with definitions (mostly USER_x_SEG in arch_x86.S,
and TSS_BASE_SEGMENT in i386_set_tss_and_kstack() (thanks Daniel for pointing this
out)).
Added a arch_thread_init_tls() function which fills the reserved slots - the find_thread()
inline asm in OS.h is finally working.
Added some more comments, resolved the ToDo items from last time :-)
arch_thread_context_switch() now calls set_tls_context() at the correct location.
arch_thread_enter_uspace() now calls set_tls_context() as there is no context
switch in this case for the current thread after TLS has been set up, and it
now gets a pointer to the thread structure directly, and calculates the user
stack top itself, rather than the callee.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:33:30 +00:00
Axel Dörfler
19321ae5a8 Temporarily removed arch_selector.c from the build - it's currently not used
at all, and assumes a fixed and wrong number of preallocated GDT entries.

Implemented TLS: there is one GDT entry per CPU. If a context switch happens,
the FS register of the new thread is set to the matching GDT, and the GDT is
changed so that it points to the current thread's TLS storage area.
This area currently resides unsafely at the bottom of the user stack - for
some reason I could not figure out, it doesn't even work correctly most of
the time (it segfaults when accessing a slot via FS). I've added a ToDo item
explaining the situation - hopefully I have more ideas when I slept a bit more...

The GDT is now no longer static in arch_cpu.c and has been renamed from gdt to
gGDT. It's now also referenced in arch_thread.c, and it would make sense for
arch_selector.c to use it as well (instead of another local copy).
arch_cpu_init2() now uses the set_tss_descriptor() inline function and the
TSS_BASE_SEGMENT macro to set up the TSS section. It now also sets up the
TLS segment descriptors (as TSS, one entry per CPU).

Since I removed desc_table from the headers (the GDT is now a (segment_descriptor *)),
I added it locally to arch_int.c.
i386_enter_uspace() now don't set the FS register to 0x23 anymore, since it's
now already set correctly at the end of arch_thread_context_switch().

Some clean-ups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:25:01 +00:00
Axel Dörfler
722bf47f67 Added some ToDo items.
Smaller cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:10:54 +00:00
Axel Dörfler
1d661e3285 Just slightly changed a comment; there was more, but I removed that, and
I was too lazy to revert that little change back, so that I would be able
to write this short paragraph explaining what I've done.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:10:03 +00:00
Axel Dörfler
d703e5451d Removed an XXX comment question, and replaced it with an explanation of the
issue.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:08:13 +00:00
Axel Dörfler
50808915da Removed unused file int.c.
Minor style changes in arch_vm*.c


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:56:53 +00:00
Axel Dörfler
e8bfc82801 Removed config_manager from the old location (now in src/add-ons/kernel/bus_managers)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:23:06 +00:00
Axel Dörfler
c893786008 Exported the whole known driver module API - not implemented yet, though.
Removed the probably broken bus module info.
Renamed functions cfdm -> driver, cfbm -> bus.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-31 18:33:32 +00:00
Axel Dörfler
ed5c11d75a Included NewOS change 1674 - moved architecture dependent part of elf.c
to the correct location.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-30 13:33:22 +00:00
Axel Dörfler
7747cd8133 Included Travis' change 1687.
Cleanups, added TRACE() debugging macro instead of commented dprintfs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-30 11:18:57 +00:00
Axel Dörfler
2d4d170f83 Some cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-30 11:17:36 +00:00
Axel Dörfler
ce29ea4e8f Removed it again :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-10 04:27:38 +00:00
Axel Dörfler
796a8651e9 Added a skeleton for the image API. Contains almost no code yet, though, only
some structure definitions (to outline some basic ideas), and the symbols
exported to userland.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-10 03:36:18 +00:00
Axel Dörfler
d768457f49 Included NewOS change 1685 in OpenBeOS; a fix for the VM.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-08 23:12:09 +00:00
Philippe Houdoin
a4d52d3edf Add missing headers/os/drivers/KernelExport.h functions here and there.
Some int -> cpu_state cleanup on the way, and implement the
B_KDEBUG_CONT and B_KDEBUG_QUIT features in our kernel debugger.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-07 00:25:50 +00:00
Axel Dörfler
424880282f Fixed a warning.
Replaced "int state" with "cpu_status state" where appropriate.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-04 16:40:07 +00:00
Axel Dörfler
fb101ff170 Completely rewritten the module iterator code. Fixed many bugs in that
code and made it much simpler (it now just uses a stack of path names
instead of this complex doubly-linked module_iterator_dir list).
Now works together with the rest of the code without making any problems.
Added a module_test() function which iterates over all existing modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 17:54:09 +00:00
Axel Dörfler
ac5b2b4ece bootfs_read_dir() and devfs_read_dir() both returned B_ENTRY_NOT_FOUND
instead of B_OK for the last directory entry.


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


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


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


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


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


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


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


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

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


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


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


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


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

MAX_SIGNO replaces 32 in several spots


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-29 02:21:22 +00:00