Commit Graph

25526 Commits

Author SHA1 Message Date
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
Axel Dörfler
826df7bec8 * Patch by Andreas Färber: remove undefined S_ISTXT from ALLPERMS.
* This fixes bug #2560.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 12:51:40 +00:00
François Revol
7b22dac921 Handle new semantics on map_max_pages_need.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 12:09:23 +00:00
Stephan Aßmus
1fffad3f43 Refactored a new class FileIterator from Grepper that will make adding
node monitoring easier. Also, FileIterator will be split to make the code
cleaner with regards to folder or selection mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 10:45:51 +00:00
Ingo Weinhold
5054db1859 * Use vfs_vnode_io() to schedule subrequests instead of calling the FS's
io() hook directly (it might not even have one).
* Fixed incorrect check in synchronous_io() which would cause requests
  with more than one vec to finish early. Fixes bug #2558.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 01:55:25 +00:00
Ingo Weinhold
58306fecd6 * Added tracing for vfs_{read,write}_pages).
* {read,write}_pages() use vfs_{read,write}_pages() now, instead of
  invoking the FS {read,write}_pages() hooks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 01:48:10 +00:00
François Revol
e07a1266f0 Start of boot video mode support. Not finished.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 01:40:57 +00:00
François Revol
e1ebbfbbd8 Fix gcc4 build. my->beers--;
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 23:57:03 +00:00
Ingo Weinhold
70ce6a9ade Don't allow the kernel team to be passed to
elf_debug_lookup_user_symbol_address().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 23:56:26 +00:00
Ingo Weinhold
a9d458d8db Also init kernel_stack_top for the idle threads. It was NULL before,
which caused stack traces in those threads to crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 23:50:14 +00:00
Ingo Weinhold
771491bec8 The command line args can easily exceed the maximal tracing buffer
allocation size, which caused the Exec traced entry to crash when
printed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 23:48:29 +00:00
Ingo Weinhold
0ad9adef62 Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 21:15:17 +00:00
Oliver Ruiz Dorantes
001662ae04 A bit more styling on main headers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 21:15:02 +00:00
Ingo Weinhold
7cc9a52df8 IORequests leaked their IOBuffers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 20:51:59 +00:00
Ingo Weinhold
c421c138b6 vm_create_anonymous_area():
* Moved reservation of memory for the "locked" cases upfront.
  Particularly if the would-be area is a kernel area, we don't want the
  address space to be write locked while doing that, since that would
  block the low memory handler.
* For full lock areas the pages are reserved upfront, too. The reasoning
  is similar. Reserve the pages needed by the translation map backend for
  mapping the area pages there too.
* Moved the cache locking/unlocking out of the individual cases. All
  want to have the cache locked the whole time, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 20:24:41 +00:00
Ingo Weinhold
802d18a970 Small semantical change of map_max_pages_need(): If given a 0 start
address, it is supposed to consider the worst case address range of the
given size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 20:11:11 +00:00
Stephan Aßmus
eeb8244dc2 Add TextSearch to the image (apps folder but not Haiku menu), create link
in Tracker add-ons folder with short cut (like done for Backgrounds). Untested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 18:54:13 +00:00
Stephan Aßmus
edf2516d60 Moved TextSearch to apps folder, since it's actually a regular app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26738 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 18:51:20 +00:00
Stephan Aßmus
6c3234ba0b * Imported Tracker Grep 5.1 source code
* Renamed it to TextSearch
* Cleaned up the code to match our coding style (already was almost compliant
  and the code is very clean and well designed, a pleasure to work with!)
* Fixed memory leaks and potential memory leaks in error codepaths
* Checked the success of most allocations (GrepWindow is missing) and
  implemented error code paths
* Simplified the code in a few places
* Fixed bugs in code that iterated over the selected list items and assumed
  it found a top level item already while it may not have


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 18:43:22 +00:00
Ingo Weinhold
d172ee84c3 * Fixed recently introduced write lock leak, when something failed
before file_cache_write() or nothing had to be written.
* Fixed race condition. While neither transaction nor read lock are
  held, the file size can change.
* Add the inode to the transaction whenever possible, i.e. on error
  before file_cache_write() and after it as well. This should prevent
  readers from seeing inconsistent blocks when the transaction has to be
  rolled back.


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