25579 Commits

Author SHA1 Message Date
Axel Dörfler
f8009f7ba4 * Applied patch by kaliber: those headers weren't self-containing.
* This closes bug #2346.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26841 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26841
2008-08-06 10:01:53 +00:00
Axel Dörfler
a8b77fe01e * Reenabled the ASSERT() in ata_request_set_status(), the problem has been
fixed. Not sure why the 6 to 10-byte command translation was triggered,
  though.
* Minor coding style changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26840 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26840
2008-08-06 08:57:23 +00:00
Axel Dörfler
6568215497 * scsi_read_write_6() was incorrectly translating 6-byte requests with a length
of 0 (as this means 256 blocks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26839 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26839
2008-08-06 08:54:49 +00:00
Axel Dörfler
f8a59924e5 * Added Dump() method to IORequest, IOOperation, IOBuffer, and DMABuffer.
* Added KDL commands "io_request", "io_operation", "io_buffer", and
  "dma_buffer".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26838 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26838
2008-08-06 08:01:07 +00:00
Ingo Weinhold
8d12bd1370 * Moved the incrementing/decrementing of vm_page::wired_count into
dedicated functions.
* Introduced gMappedPagesCount variable which counts the total number of
  physical pages that are mapped.
* Added vm_page_get_stats() which fills in the memory related part of
  the system_info structure. Used and cached pages are computed
  differently, now. The "available" (== not committed) memory is no
  longer used for the computation as it doesn't say anything about the
  actually used/free pages (with swap support enabled it is even
  less meaningful, since we first commit swap space when possible).
  We do also consider the memory used by the block cache as cached
  pages, now. All in all these changes should fix the memory statistics
  reported by get_system_info(), IOW bug #2574.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26837 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26837
2008-08-06 00:28:28 +00:00
Ingo Weinhold
c79e66abb7 Added block_cache_used_memory() that returns the memory allocated by all
block caches for the block cache buffers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26836 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26836
2008-08-06 00:09:31 +00:00
Ingo Weinhold
5db876653b Added object_cache_get_usage() function that returns the memory
allocated by an object cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26835 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26835
2008-08-06 00:07:55 +00:00
Oliver Ruiz Dorantes
8bd7491914 Commit the file i forgot yesterday (ioctl change and cleanups)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26831 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26831
2008-08-05 22:12:24 +00:00
Jérôme Duval
43619079f8 sManagedEnviron is already checked for NULL value in free_variables()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26830 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26830
2008-08-05 22:06:21 +00:00
Axel Dörfler
65f1e8eceb * Ported scsi_cd, too, still untested.
* This should have been part of r26828, although it did not break the build :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26829 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26829
2008-08-05 21:15:28 +00:00
Axel Dörfler
24593e2c79 * First baby steps in letting our drivers use the new I/O request/scheduler
architecture: for now, we do this on the lowest layer only, therefore all
  requests are handled synchronously (ie. in the scheduler's thread).
* Instead of using the block_io module, scsi_disk (and scsi_cd) are now
  exporting a device on their own, and use an I/O scheduler with an appropriate
  DMA resource.
* There are still lots of TODOs, and it can easily panic - don't update if
  you intend to demo Haiku.
* scsi_periph now only has an io() function that get an io_operation, instead
  of the previous read/write functions, moved preferred CCB size from those
  functions into the device registration.
* Changed all scsi_periph files to C++.
* scsi_cd ported, too, but untested.
* Removed block_io from image - it will be removed completely soon.
* Temporarily commented an ASSERT() in the ATA bus manager (in case you use
  it); it's sometimes triggered by the code now, and I haven't yet looked into
  the issue -- doesn't seem to harm, at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26828 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26828
2008-08-05 21:11:51 +00:00
Maurice Kalinowski
34faa5f214 * In case we do not have any frames to convert we'll need to break,
otherwise we end up in an endless loop. This only happened when
   the remaining raw data provided did not contain enough content.
   In this particular case there were only 2 bytes remaining though
   the decoder needed 4 bytes to handle at least 1 frame. Seems like
   the audio file only provided data for one channel in the end, which
   did not lead to a B_LAST_BUFFER_ERROR yet as it has been read properly.
 * This fixes bug 1708 and most probably 1275 as well (someone check and
   close please)

Didn't we just have a discussion about Media handling killing the system
:P

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26827 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26827
2008-08-05 21:09:12 +00:00
Maurice Kalinowski
2b273dbc5d whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26826 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26826
2008-08-05 21:09:01 +00:00
Axel Dörfler
39b5c37418 * Added a DMAResource::Init() method that gets a device node - for now, it will
reuse the block_io attributes in the node to build the dma_restrictions.
* DMAResource::Init() now dumps the dma_resources (should be done with the
  TRACE() macro later).
* Turned off IOScheduler debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26825 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26825
2008-08-05 21:00:02 +00:00
Karsten Heimrich
9e8c301a39 * fix of by one error, makes printing of ranges work properly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26824 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26824
2008-08-05 20:42:34 +00:00
Karsten Heimrich
14ea5e5e98 * whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26823 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26823
2008-08-05 20:41:31 +00:00
Karsten Heimrich
1a74e75248 * replace some whitespaces
* return error in case we could not get all values from JobConfig



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26822 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26822
2008-08-05 20:40:49 +00:00
Karsten Heimrich
1c08970124 * make use of libprint inbuild Preview class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26821 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26821
2008-08-05 20:39:11 +00:00
Axel Dörfler
8169e6b4e6 * Patch by Andreas that adds sched.h, and sched_yield() to Haiku.
* This closes ticket #2568.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26820 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26820
2008-08-05 17:54:14 +00:00
Ingo Weinhold
57f2b5a013 * Changed the meaning of the {KERNEL,USER}_STACK_SIZE macros to not
include the guard pages. Adjusted the kernel and boot loader code
  accordingly -- the guard pages size is added/not removed respectively.
  The stack size passed to _kern_spawn_thread() is now the actually usable
  size, and it is no longer possible to specify a size smaller than or
  equal to the guard pages size.
* vm_create_anonymous_area(): Precommit two pages maximum -- a stack with
  only one page usable size obviously doesn't need two pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26819 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26819
2008-08-05 17:19:46 +00:00
Axel Dörfler
afa9fe8958 * Patch by Andreas: we did not store ebp in vregs::ebp, and we did not store
ebx at all.
* This fixes bug #2569.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26818 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26818
2008-08-05 17:13:06 +00:00
Ingo Weinhold
7bcc8f0f61 Removed whitespace at the end of lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26817 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26817
2008-08-05 16:56:25 +00:00
Ingo Weinhold
5737b4aed8 * Increased the maximal number of (pseudo) semaphores.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26816 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26816
2008-08-05 16:52:11 +00:00
Axel Dörfler
c569fd76b4 * Coding style cleanup, pointed out by Andreas.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26815 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26815
2008-08-05 13:57:14 +00:00
Salvatore Benedetto
79f556e5a6 * Check for wake ups on Revert()
* Fix TRACE() output
* Check for IPC_CREAT in xsi_semget when IPC does not yet exist
* Fix bound checking
* Fix setpid call



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26814 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26814
2008-08-05 09:44:36 +00:00
Stefano Ceccherini
03c9250f85 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26813 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26813
2008-08-05 08:33:40 +00:00
Karsten Heimrich
6e758d67b9 * cleanup
* sync against the preview driver
* fixed totally broken multiple pages on single page preview



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26812 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26812
2008-08-04 23:29:40 +00:00
François Revol
6ac63f933f - fix warning
- fix build (weird ioctl name)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26811 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26811
2008-08-04 23:18:03 +00:00
Ingo Weinhold
3f075fe6b5 We must not do any kernel exit work when we originally didn't come from
userland. E.g. preparing a signal handler would terribly go wrong, since
we don't have a userland iframe. This fixes bug #2562 and maybe also
#2522.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26810 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26810
2008-08-04 21:53:10 +00:00
Stephan Aßmus
962a6c67e9 Finished implementing and enabled node monitoring on the folders and files
of the current search. If new files match the pattern, the appear in the
results, or are removed if they don't match anymore. The results also
adapt to changes in the files.
Basically, I added another iterator that is also used to track changes when
node monitor events arrive. Only those changed files are grepped again after
a timeout of .5 seconds when no new node monitor events pour in.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26809 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26809
2008-08-04 21:51:33 +00:00
Ingo Weinhold
2a24bab833 arch_setup_signal_frame(): panic() if we don't have a user iframe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26808 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26808
2008-08-04 21:49:11 +00:00
Ingo Weinhold
5ccf1db34d * Also print whether an iframe is a userland or kernel iframe.
* In case of a kernel iframe the iframe is shorter -- fixed the output
  accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26807 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26807
2008-08-04 21:47:37 +00:00
Ingo Weinhold
783c4e20b4 Added comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26806 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26806
2008-08-04 21:45:50 +00:00
Stephan Aßmus
a9ab16e27c * Move the LockLooper() call before PathHandler::Quit() into Quit().
* The B_QUIT_REQUESTED message never arrived for me unless I unlock the
  BLooper again, then it works as expected.
* The B_QUIT_REQUESTED handling accessed fOwnsLooper after deleting the
  object.
(Review much welcome - I don't understand the purpose of locking the BLooper
at all before trying to use a BMessenger to send it a message.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26805 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26805
2008-08-04 21:16:11 +00:00
Oliver Ruiz Dorantes
5c78f79f3a Fix gcc4 build (using __FUNCTION__), and more whitespaces cleanups...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26804 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26804
2008-08-04 20:13:03 +00:00
Oliver Ruiz Dorantes
859039e124 Cleaning whitespaces/tabs and styling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26803 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26803
2008-08-04 20:03:23 +00:00
Oliver Ruiz Dorantes
20a5113818 - Proper const use
- Styling



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26802 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26802
2008-08-04 19:10:43 +00:00
Oliver Ruiz Dorantes
af9ccaf254 Use const reference as input parameter as suggested by julun
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26801 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26801
2008-08-04 17:58:09 +00:00
Axel Dörfler
1be4b7c0c5 * Build fix when built with DEBUG defined.
* Forgot to remove the "bfs_block_runs" debugger command on module unload.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26800 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26800
2008-08-04 17:56:13 +00:00
Oliver Ruiz Dorantes
8976dbe878 - First steps for SCO connections
- Some styling 
(Mika Lindqvist)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26799 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26799
2008-08-04 17:14:06 +00:00
Axel Dörfler
2c0c5e6c21 * Fixed a bug in scsi_periph that prevents accessing block number 0x100000.
* The blocks beyond that would be potentially read in smaller chunks than
  anticipated, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26798 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26798
2008-08-04 16:36:02 +00:00
Axel Dörfler
4468706ca3 * Now uses _kern_write_stat() directly in order to resize the swap file
without filling it with zeros (ie. make use of B_STAT_SIZE_INSECURE).
* Added TODO that closing the file descriptor in swap_init_post_modules()
  (that should probably renamed to swap_init_post_boot_device()) is not really
  a good idea.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26797 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26797
2008-08-04 16:10:25 +00:00
Axel Dörfler
c7dc57457d * We must call file_cache_disable() with O_NOCACHE also in bfs_create().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26796 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26796
2008-08-04 16:04:57 +00:00
Stephan Aßmus
3b364ddd42 Intermediate commit, because I want to rename FolderIterator but it has changes.
* Beginnings of node monitoring support. Currently disabled, but detects
  new, changed and removed files. Folders untested yet. There may also be
  a problem with the toplevel folders when a pose selection message is used.
  That's untested too as of yet.
* Removed some superfluous whitespace.
* Small refactoring in FolderIterator to access some stuff from the outside
  as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26795 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26795
2008-08-04 15:16:30 +00:00
Axel Dörfler
34d496f8c3 * For regular files, BFS will now preallocate much more than the previous 64 KB,
which are now only used for directories and for files smaller than 1 MB.
* For files between 1 MB and 32 MB 512 KB are used as preallocation size,
  everything beyond that will get a 1/16 of their file size, ie. 4 MB with a
  file size of 64 MB, 64 MB with a file size of 1 GB.
* This should help a lot with fragmentation of large files when they are written
  synchronously.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26794 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26794
2008-08-04 14:54:22 +00:00
Axel Dörfler
1a168f3f1f * Added KDL command "bfs_block_runs" which shows the blocks runs in an array.
* The "bfs" KDL command now also accepts ',' as group/start delimiter in a
  block_run.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26793 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26793
2008-08-04 14:50:32 +00:00
Stephan Aßmus
e8f39ce96a Don't choke in BPathMonitor::StopWatch(...) if the client never called
StartWatching() before and the BPathMonitor stuff is therefor not initialized.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26792 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26792
2008-08-04 14:25:26 +00:00
Ingo Weinhold
fe74d94e3c Test program to reproduce bug #2562.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26791 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26791
2008-08-04 14:23:06 +00:00
Axel Dörfler
423fcd43ae * Shuffled initializers around: the team, ELF, and module initializers come
now a lot earlier.
* That makes it now possible to use modules pretty early in the kernel (like
  before timer_init(), or int_init_post_vm()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26790 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26790
2008-08-04 13:26:13 +00:00
Axel Dörfler
cc0b310748 * We're now using an anonymous condition variable for the team's dead children
instead of publishing it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26789 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev26789
2008-08-04 13:09:40 +00:00