Commit Graph

26030 Commits

Author SHA1 Message Date
Salvatore Benedetto
67a6ba1c21 * Fix some identation. No functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 11:46:15 +00:00
Ingo Weinhold
4f2d40ec1b * The callback object created in WriteAsync() was never deleted. Thus
eventually the VIP heap would be exhausted.
* WriteAsync() didn't call the provided callback when an error occurred
  before invoking vfs_asynchronous_write_pages(). The page writer would
  get stuck in those cases.
* The object cache used for the swap blocks does now use the
  asynchronous resizing feature to avoid deadlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 03:28:35 +00:00
Ingo Weinhold
1cda5944ad Added object_cache_set_minimum_reserve() which sets the minimal number
of free objects an object cache should try to have ready. If the number
of free objects drops below the threshold, a new urgent priority thread
is asked to asynchronously resize the object cache (pretty similar to
the heap grower thread). Such a mechanism is necessary for code paths
that are supposed to free pages, but may need memory themselves (like
the swap support).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 03:21:37 +00:00
Ingo Weinhold
17331a1768 * IOBuffer::Delete(): Check for NULL pointer. The IORequest destructor
calls the method unchecked, and the buffer can actually be NULL, if
  Init() failed.
* panic() when running out of VIP memory, at least when KDEBUG is
  set.
* Use heap_set_get_caller() for the VIP heap, so the heap leak checking
  produces useful caller addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 03:11:47 +00:00
Ingo Weinhold
4a40451dd9 The "symbol" command does now set its return value to the symbol
address, so it can be used in expressions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 03:05:26 +00:00
Ingo Weinhold
9e637a6a84 * Added heap_set_get_caller() which can be used when heap leak checking
is enabled to set a per-heap get_caller() function.
* Added "-h <heap>" option to the "allocations_per_caller" command. If
  given only the allocation for the specified heap are considered.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 03:04:12 +00:00
Bruno G. Albuquerque
82427071c1 - Added skeleton for new cddb_server.
- Includes all relevant handling of CDDA exported attributes so you guys can
  see where I am going with this.
 
CDDB handling (including server connection, request and response parsing)
will come up next. In the future we will also have a configuration panel
and a Deskbar replicant for controlling it.

Do we really have to edit the Jamfile in the parent dir to get something
building with our build system?



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 02:33:19 +00:00
Alexandre Deckner
009aa366c6 - Changed Alt/Ctrl mode handling in Menu prefs, BMenu and Appearance
prefs as discussed in #2139 comments. This allow using Alt-Gr in either 
Ctrl or Alt mode. Appearance needs a serious style cleanup, comming next 
:)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 00:59:30 +00:00
Jérôme Duval
996be6dbb5 should have been part of previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 23:28:06 +00:00
Jérôme Duval
5e29d55ee6 updating less with version 418, based on a checked patch from Scott.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 23:24:01 +00:00
Jérôme Duval
3658735727 fDeviceAddons wasn't maintained correctly. this fixes #2610
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 23:07:08 +00:00
Axel Dörfler
2a1a5a296f * Turned off debug output of the FileMapDisk stuff.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 20:44:29 +00:00
Axel Dörfler
8b7a165ad3 * We still lose information, so I enlarged this buffer a bit more.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 20:43:03 +00:00
Axel Dörfler
27ba18f412 * Turned off debugging output (intel.cpp still puts out some stuff, but only
when compiled for the kernel).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 20:42:24 +00:00
Axel Dörfler
7a253cf5fe * Since the file cache can access any kind of data (and not just file data),
we must use {read|write}_pages() instead of {read|write}().
* This should fix accessing other file systems than BFS (ie. those that doesn't
  have an io() function) like ext3 and FAT.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 20:22:06 +00:00
Alexandre Deckner
1a8eb15993 - reverted last commit until the remaining issues are fixed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 18:50:14 +00:00
Alexandre Deckner
70e1a438fd -Fix keymaps where RCommand and ROption were inverted, menus shortcuts
and Menu preflet now show correctly wich mode you're on.

 Unless we implement a more flexible solution, we can't really customize 
these 
keys in the keymap anyway (for ex: Menu preflet will wrongly detect 
the mode, and if you change it, it will overwrite your keymap with the 
default hardcoded values anyway)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 17:24:49 +00:00
Salvatore Benedetto
e1d037ce88 * Fixed some coding style violation introduced in my previous commit. Thanks Axel!
The recognition code is actually working, I was just using the wrong dvd. I'm now
using an iso file created with mkisofs.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 17:04:01 +00:00
Salvatore Benedetto
feea37380d * Replaced PRINT call with TRACE
* Improved debug output



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 17:00:53 +00:00
Salvatore Benedetto
0c3428791d * Renamed error to status
* Replaced some PRINT with TRACE 
* uncommented udf_recognized function call in Mount method
* minor clean up



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 16:59:07 +00:00
Bruno G. Albuquerque
df8aa69a76 - Created a static version of Attribute::IsProtectedNamespace() that takes an
attribute name as input. Handy for whyen we do not have an Attribute object
  around.
- Made the non-static version fall back to the static version.
- Also check for the protected namespace when creating attributes. For
  consistency, we should also not be able to create attributes in this
  namespace.
- Added some new style violations. ;)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 15:48:37 +00:00
Bruno G. Albuquerque
bb6b4c5076 - More style updates. Thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 14:37:43 +00:00
Bruno G. Albuquerque
b2807ad696 - Added the concept of a restricted attribute namespace. The attribute class
now has a IsProtectedNamespace() member.
- All CD:* attributes can not be directly edited by the user as they are
  internally maintened by the add-on itself.
- Style updates (thanks Stefano!)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 13:41:31 +00:00
Bruno G. Albuquerque
84719cae24 - Add a new CD:do_lookup attribute. It will be used by userland programs (like
cddblinkd) to know if they should lookup the CD or not. It will be true
  unless:

  1 - The CD has CD-Text information.
  2 - The user (or a userland program) changed the Volume name.
  3 - The user (or a userland program) changed any track names.

- Moved (again) attribute creation to before the stored attributes are read. As
  attribute operations happen in memory in cdda, we don't need to care about
  the IO cost and this way it is more in line with all the other attributes
  created.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 13:10:18 +00:00
Salvatore Benedetto
6960a91cd7 * Improve debug output
* Better formatting code

No functional changes.

Right now the code fails on recognizing the descriptor sequence.
I have to figure out if I pass the wrong values to the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 12:28:16 +00:00
Ingo Weinhold
aab58d8730 Implemented (a simple) WriteAsync(), i.e. swap pages are now written
asynchronously, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 11:44:23 +00:00
Axel Dörfler
743b3f1527 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 08:32:44 +00:00
Stefano Ceccherini
8c3921d063 fix gcc4 warning
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 08:21:25 +00:00
Axel Dörfler
4bfeb6f37a * Changed the way how a cache is destructed: now, it is removed from the
global cache list before locking it. This allows to get rid of the
  block_cache::deleting field, as well as simplifies some code.
* This also fixes a possible deadlock I recently introduced (on destruction,
  the locking order was wrong).
* Now uses an anonymous condition variable instead.
* Moved the block_cache initialization code into a dedicated method that will
  now also fail in case the low resource handler couldn't be registered (as
  pointed out by Salvatore).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 08:09:18 +00:00
Bruno G. Albuquerque
d4969c919a - Moved creation of the CD:cddbid attribute to after the saved attributes are restored.
- Only adds it if it does not exist yet.

This does not change anything but makes more sense anyway.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 01:51:23 +00:00
Bruno G. Albuquerque
7c1b58f2bb - The wrong version of Inode::Attribute(0 was being called. Now setting the
attribute type works.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 01:34:43 +00:00
Ingo Weinhold
c9b064de56 * Added "swap" debugger command printing some info on the swap space.
* Fixed lock leak in Write().
* Fixed bug in _Commit(): swap_space_reserve() was fed with the wrong
  value (could even be negative).
* swap_free_page_swap_space(): Removed incrementing of sAvailSwapSpace.
  The function is only supposed to deallocate swap space, not to
  unreserve it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 23:43:41 +00:00
Ingo Weinhold
5c8d420b7c * Added "bool wait" parameter to _GetOperation(). If false and no unused
operation is available ATM, it will return NULL.
* _Finisher() does now re-schedule a request, if all of its operations
  finished successfully, but there are still remaining bytes.
* _Scheduler() does now operate in two passes. First it creates as many
  operations for a given request as possible, then it executes the
  operations. This fixes bug #2644. The problem was that by creating and
  executing the operations in a single loop, an operation could be
  finished before the next one was added. The request would thus be
  considered finished and the request owner be notified. This would
  usually lead to the destruction of the request while it was still in
  use.
* _Scheduler(): In case we don't have a DMA resource also advance the
  request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 21:37:16 +00:00
Ingo Weinhold
16d07755e4 * IOBuffer does now track whether its memory is locked.
* Moved memory unlocking from IORequest::OperationFinished() to
  IORequest::NotifyFinished(). This way we can reschedule a request,
  e.g. if we didn't have enough unused IOOperations at hand the first
  time.
* Added some more debug output and asserts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 21:17:36 +00:00
Marcus Overhagen
1d19f96fff Removed my Copyright notice, assign future copyright to Haiku Inc, in contribution to ticket #2191
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 19:28:41 +00:00
Axel Dörfler
60642f8781 * The EDID info is now only dumped if TRACE_VIDEO is defined (currently the
default).
* Enlarged the serial buffer that is handed over to the kernel to 8192 bytes.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 18:37:30 +00:00
Alexandre Deckner
5aa001b423 - Switch BListView selection modifiers as was done for Tracker in my previous commit. It now
even conforms to the bebook! BOutlineListView needs no special change. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 16:42:13 +00:00
Stephan Aßmus
53200f8efa Icon-O-Matic will now fall back to trying to open the icon attribute of any
node it is requested to open. That this would happen was an assumption of
the FileTypes preflet. Adding an icon to a node from the FileTypes add-on
will now work. Previously, Icon-O-Matic thought this was supposed to be an
icon file. Perhaps it would be better if Icon-O-Matic would ask the user if
adding an icon was the intention. FileTypes could put a flag into the message
to supress this alert. On the other hand, if adding an icon was not the
intention, the user may as well simply close Icon-O-Matic.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 15:53:37 +00:00
Stephan Aßmus
0470025008 Small cleanup for 80 char/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 15:49:57 +00:00
Alexandre Deckner
7f1535c0d2 - BPictureButton didn't account for the disabled state. Fixes #2410
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 13:54:42 +00:00
Stefano Ceccherini
1b6b5b83ab other part of the patch from andreasf (fixes bug #2637)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 13:51:37 +00:00
Stefano Ceccherini
f9eba888ca patch from andreasf which fixes build for gcc4 (part of bug #2637
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 13:50:02 +00:00
Axel Dörfler
a1f34e7e89 * Only remove the block cache from the list, and its low resource handler when
this is actually needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 11:30:14 +00:00
Alexandre Deckner
c56a21ed62 - Made multi-selection modifier semantics consistent with most OS's out there. See #1255,
please shout if you've got anything against that :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 10:59:10 +00:00
Axel Dörfler
1d136d5a76 * Fixed bug #2631 based on a patch by Salvatore: the block cache was put into
a global list before it was fully initialized.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 08:40:55 +00:00
Ingo Weinhold
7fd3b44794 Patch by Zhao Shuai with small changes by myself:
* Some renaming: A location in a swap file where a page can be stored is
  now called "slot" instead of "page" or "swap page".
* swap_slot_alloc(): Update the hint more correctly after allocating
  slots at the hint.
* swap_space_reserve(): When less than the requested space could be
  reserved, it always returned 0 and leaked the remaining pages.
* swap_file_delete(): sSwapFileListLock wasn't unlocked in error cases.
  Use MutexLocker now.
* swap_free_page_swap_space(): sAvailSwapSpace wasn't updated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 00:32:54 +00:00
Ingo Weinhold
2a79a7686f * VMCache::Write(): Added "uint32 flags" argument which is supposed to
be passed on to the IORequest. Most relevantly physical pages can now
  be written directly by passing B_PHYSICAL_IO_REQUEST.
* Added VMCache::WriteAsync() which is supposed to write pages
  asynchronously. The base class version version falls back to the
  synchronous Write(). Only VMVnodeCache implements WriteAsync() ATM,
  VMAnonymousCache (swap support) still has to be adjusted accordingly.
* write_page() doesn't need to map the page anymore as it can write the
  physical page directly.
* Modified the page writer to write pages asynchronously. This shouldn't
  have any noticeable effect yet. It will though as soon as the I/O
  scheduler reorders I/O operations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 23:28:34 +00:00
Ingo Weinhold
663948966c Added method vfs_asynchronous_write_pages(), which, unsurprisingly,
writes the given page iovecs asynchronously. The new class
AsyncIOCallback is used to inform the caller when the request has been
finished.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 23:09:10 +00:00
Ingo Weinhold
80048d7de3 * Added B_DELETE_IO_REQUEST flag, which causes the IORequest to be
deleted automatically when it's finished.
* Added IORequest::Create() for creating a IORequest on the heap
  (respectively the VIP heap).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 22:59:56 +00:00
Stephan Aßmus
1dfa5a7d2a size is actually icon_size, not data size, thanks Axel for pointing out!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 22:55:03 +00:00