Commit Graph

25745 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
2008-08-04 13:09:40 +00:00
Stephan Aßmus
b5bc41debf * Use new header layout in PathMonitor.h
* Honor 80 char/line limit in PathMonitor.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 13:04:45 +00:00
Stephan Aßmus
3896078543 * Refactoring, added const specifiers to helper methods that don't modify the
object.
* Improved check that enforces search pattern history limit to also handle
  the case when the limit is changed in the source.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 12:53:55 +00:00
Stephan Aßmus
684507777b Refactoring
* FileIterator is now a mostly abstract interface
* FolderIterator is the currently only implementation (there could be
  MessageIterator for an even better separation, which would read the top
  level search folders from the BMessage with the selected poses, but it
  would mostly use the same code for traversing the subfolders anyways so I
  left that for the time being.)
* The Grepper and FolderIterator now copy the current settings from the Model
  at instantiation. Since they run in a separate thread and the Model may
  actually be changed from the Window thread, I think this is just a cleaner
  and more safe solution.
* Cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 11:30:21 +00:00
Axel Dörfler
3c1a3047a4 * Added file_cache_is_enabled() function.
* Added file_map_set_mode() function that you can use to keep a whole file
  cached. This is needed for the swap file support: FILE_MAP_CACHE_ALL will
  not only precache all file_io_vecs when called, but it will also cause all
  file_map_translate() calls to fail that would require further caching (ie.
  if the file size had changed).
* Updated the fs_shell file map code to the latest one (with several bug fixes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 08:28:17 +00:00
Fredrik Modeen
b555dcbd39 comment fix and fixed some return error from BeBook
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 05:45:52 +00:00
Ingo Weinhold
355604212d Patch by Zhao Shuai with changes by myself:
* Keep track of the stack space actually allocated for the cache and let
  Write() fail when we've already allocated as much as reserved.
* Added second phase of swap initialization (swap_init_post_modules())
  which reads the virtual memory driver settings and creates/resizes a
  swap file. ATM truncate() is used to resize the swap file, but that is
  a bit slow. We should probably introduce a VFS function to use BFS's
  fast method.

This should make swap support work somewhat, but since swap space is
never freed ATM this would be a relatively short pleasure. Still
disabled by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:28:46 +00:00
Ingo Weinhold
8eabecf603 Use kprintf() instead of dprintf() in debugger commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:19:54 +00:00
Ingo Weinhold
bf877a18ab Should have been part of r26779.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:19:10 +00:00
Ingo Weinhold
88a2565650 * Added support for O_NOCACHE/O_DIRECT.
* bfs_open() was leaking the already allocated cookie in several error
  conditions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:18:10 +00:00
Ingo Weinhold
7491000f20 Added functions file_cache_{disable,enable}(). They allow to disable
actual caching in the file cache, i.e. all reads and writes go directly
to the underlying device. The implementation is not quite complete,
since the VM can still add pages to the cache when the file is mmap()ed,
which can lead to inconsistencies.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:15:50 +00:00
Ingo Weinhold
2f462cb8e9 Copied AutoDeleter.h for use in the FS shell.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:03:31 +00:00
Ingo Weinhold
40d9ff3ae4 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:02:25 +00:00
Ingo Weinhold
be87a4934e do_iterative_fd_io():
* When do_iterative_fd_io_iterate() fails, we must not invoke the
  supplied finished hook explicitly, since it is invoked indirectly by
  request->SetStatusAndNotify() anyway. Should fix #2557.
* We must detach the descriptor putter as soon as we have adjusted the
  request's finished callback, since that will put the descriptor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 02:57:03 +00:00
Ingo Weinhold
bca3215f8a * Introduced x86_get_double_fault_stack(), which returns the address
and size of the double fault stack.
* is_kernel_stack_address() does now also check whether the given
  address is on the double fault stack. This fixes stack traces on
  double faults, which were broken (i.e. went only to the double fault
  iframe) since we started checking whether the addresses are on the
  kernel stack at all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 02:51:38 +00:00
Ingo Weinhold
39ec9b48bd vm_page_fault(): Only put the address space, if we actually got one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 02:46:07 +00:00
Ingo Weinhold
1a617f516a More informative panic().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 02:45:06 +00:00
Ingo Weinhold
d3e2a6d7cc Fixed build with tracing enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 02:43:48 +00:00
François Revol
d3e9ddff8a - fix arch_debug_get_caller()
- implemented arch_debug_get_stack_trace(), should allow building with TRACING enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 01:30:33 +00:00
François Revol
eec73aabb7 - fix page dir index
- fix comment
- mode debug output
- don't lookup unmapped pages in early_query


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 19:53:09 +00:00
François Revol
34f723cdc8 gcc4 fix. my->beers--;
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 19:43:59 +00:00
François Revol
d06c88d37d Just go for 256MB for transparent translation at boot, 32MB is not enough anyway yet, the kernel wants 16MB just for the heap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 19:18:56 +00:00
Fredrik Modeen
c3c574689d and now the files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:29:21 +00:00
Fredrik Modeen
9b88112267 moved _JoystickTweaker (.h) to this place
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:26:03 +00:00
Fredrik Modeen
19143948df Forgot a file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:25:08 +00:00
Fredrik Modeen
a14895cc90 Read's the joystick description file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:22:21 +00:00
Fredrik Modeen
cf859cccf6 Some small updates to joystick.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:20:05 +00:00
Axel Dörfler
7956689223 * Removed the extraneous 640x480 modes as pointed out by Gerald.
* Disabled "timing.sync != 3" check that potentially ignores modes that we might
  want to have. We could also add the mode by resolution in that case, and
  ignore the timing info completely. There should be an open bug about this,
  but I couldn't find it.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:00:20 +00:00
Axel Dörfler
6449b66e22 * As pointed out by Andreas, the previous patch wasn't really correct; ALLPERMS
should really contain all permission bits.
* It now uses S_ISVTX instead of S_ISTXT - this is how it works in Linux as
  well, while FreeBSD uses S_ISTXT there (but S_ISTXT and S_ISVTX have the
  same value there, too).
* Also fixed the fs_shell this time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 16:30:30 +00:00
Axel Dörfler
547a7d1844 * Since ShowWindow() could call ActivateWindow() again as well, we should
better call Window::SetMinimized() before calling it from there.
* And since ShowWindow() calls _SendFakeMouseMoved(), we also better don't
  call it with the window lock held, or otherwise we would potentially cause
  a deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 16:19:25 +00:00
Axel Dörfler
207e176915 * Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 16:04:20 +00:00
François Revol
39eb52d83b Implemented keyboard input for KDL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 15:57:03 +00:00
Axel Dörfler
518056893e * BWindow::Activate() now also unminimizes a window if necessary.
* Removed superfluous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 15:49:02 +00:00
Axel Dörfler
3a83c7b181 * Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 15:42:32 +00:00
Stephan Aßmus
59e13a3f06 Patch by Andrej Spielmann (GSoC):
* Simplified the subpixel related methods for the AGG "pixel format" template
  interface, the ones for the solid cover simply pass through the existing
  methods, so only one subpixel blending function is left which does the actual
  work (this removes a lot of the previously added code)
* Implemented a new rasterizer based on the original AGG rasterizer which
  implements subpixel anti-aliasing for any generic AGG vector pipelines. It
  is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie
  rotated, sheared or big enough fonts) depending on the global subpixel
  setting.
* Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp
* Simplified DesktopSettings related classes a bit and renamed previous
  FontSubpixelAntialiasing to just SubpixelAntialiasing.
* The private libbe functions for subpixel related settings moved from Font.cpp
  to InterfaceDefs.cpp where other such functions live. They are not related
  to fonts only anymore.
* Removed the subpixel related settings again from the Fonts preflet and added
  them to the Appearance preflet instead.

All of the above implements subpixel anti-aliasing on a global scale, which
to my knowledge no other OS is doing at the moment. Any vector rendering
can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts
are still affected by the Freetype complile time #define to enable the patented
subpixel rasterization (three times wide glyphs). Vector fonts and shapes are
not affected though at the moment.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 13:40:41 +00:00