Commit Graph

21392 Commits

Author SHA1 Message Date
Stephan Aßmus
722f6c5cd0 Small cleanup of duplicated files. AutoLocker and AutoDeleter are already
part of headers/private/shared, Icon-O-Matic used older versions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-30 14:03:02 +00:00
Axel Dörfler
9abdb2222c * PoseView waited for 200 ms after a B_META_MIME_CHANGED message was evaluated
to give other windows the opportunity to mark the icon invalid before
  recaching it.
* Since we currently update all app MIME types on first boot, over 400 messages
  are generated, so that delay easily caused the message queue to get full.
* I've now reduced the wait to 10 ms, and also call BWindow::UpdateIfNeeded()
  afterwards, which empties the message port, too. This fixes bug #2212.
* Note though, this should be handled completely different to make it really
  work right.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-30 09:10:53 +00:00
Axel Dörfler
873066a8e1 A bit of cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-30 09:07:06 +00:00
Ingo Weinhold
e4d2f9ba4f Removed the condition that only caches with a source can be merged.
Instead we only allow temporary caches to be merged. This remedies the
problem that after fork() + join() there remains a superfluous cache
layer for all RAM areas.
I haven't tested it, but this might improve the jam situation
memory-wise (huge heap is committed one less time), though it might
worsen it performance-wise (lots of heap pages are moved with every
merge).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-30 01:02:29 +00:00
Ingo Weinhold
ad66253c1a * Broke the cache merging code out of vm_cache_remove_consumer() into
new function merge_cache_with_only_consumer(), which is also used in
  vm_cache_remove_area(), now.
* Added tracing for the merge case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-30 00:27:02 +00:00
Ingo Weinhold
0a871009db Added VM cache kernel tracing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 22:09:51 +00:00
Ingo Weinhold
91312c915d Changed tracing output prefix from "cache" to "block cache".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 21:21:33 +00:00
Ingo Weinhold
42d3fc045e Added implementations for the __fssh_swap_int*() functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 20:52:43 +00:00
Stephan Aßmus
1083a4b6d2 Added Andreas Faerber and Scott McCreary to the list of contributors for their
help with bugs, sending patches and the ongoing Haiku-Ports effort.

As always, if you think someone should be listed, please drop me a line!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 19:56:00 +00:00
Stephan Aßmus
7494509957 Fixed typo in long description, thanks to Urias McCullough who noticed!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 19:44:25 +00:00
Axel Dörfler
55112db6ea * Do not update the internal window state in case sending the message failed.
* This is not perfect, but it makes Tracker catch up and redraw when the next
  event is due. This improves the situation in bug #2212.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 18:16:07 +00:00
Michael Lotz
c7d757a074 * For multi function devices it is not so unlikely to try to do multiple
concurent SendRequest() calls. Therefore it's probably a good idea to
  protect that, now that the request data is not dynamically allocated anymore.
* Fix warning about not returning a result in the compatibility version of
  init_mutex_etc() (which wouldn't make a difference as the Haiku version
  does not return anything).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 17:48:41 +00:00
Stephan Aßmus
cfccb35af6 Added audio mimetype for APE (Monkey's Audio), curtesy of SHINTA. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 17:27:28 +00:00
Axel Dörfler
abc690633a * AHCI and other SATA drivers aren't in busses/sata, but either busses/scsi
or busses/ide.
* This change makes the AHCI driver working again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 15:03:15 +00:00
Ingo Weinhold
9101535322 Added new kernel thread "undertaker" which gets rid of dead thread
remains. This replaces the previous mechanism of switching the thread to
a dedicated death stack. We might consider moving more cleanup work to
the undertaker, but that seems a little more involved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 14:28:31 +00:00
Axel Dörfler
2620242fd5 * Fixed broken comparisons introduced with r25702.
* Removed old OpenBeOS namespace leftover.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 14:27:57 +00:00
Stephan Aßmus
a9a5a1054b Patch by Vasilis Kaoutsis:
* Fixed warnings
* Some coding style cleanup
* Added license header


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 13:50:05 +00:00
François Revol
ebc5ec193f fix gcc4... and style rules. I won't be the only one paying beers at BeGeistert ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 12:44:18 +00:00
Axel Dörfler
1a4dcbd8de * gPCI was never set anymore after my changes. I replaced it now by a fPCI
member in AHCIController, since, at least in theory, every PCI device could
  come with its own module.
* Fixed exported module names to indicate compliance with the new device
  manager.
* Apparently, GCC4 doesn't like mixing C++/C linkage even for variables anymore,
  though it really shouldn't care about that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 12:17:22 +00:00
François Revol
c61ea1148f Fix gcc4 error about lvalue... this doesn't look clean anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 11:59:34 +00:00
Michael Lotz
e2bccb3352 Fix R5 build of USB stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 07:23:02 +00:00
Rene Gollent
d5ef3b7318 Some minor style cleanups, and some other changes I managed to miss. This gets legacy_sata registering correctly here, and appears to work as far as I can tell.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 03:54:40 +00:00
Ingo Weinhold
2b07b8e0f1 * Replaced all instances of benaphores in the kernel code by mutexes.
* Removed kernel benaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 02:08:23 +00:00
Ingo Weinhold
1c18a5df87 Replaced R/W lock implementation. Should have a little less overhead
than a semaphore, and can already be used in the early boot process.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 00:32:06 +00:00
Rene Gollent
f678c84aff Port legacy_sata to new driver architecture. However, based on device manager's kernel debugger output it's still using the generic_ide driver for my controller instead. Axel, please review.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 23:27:11 +00:00
Ingo Weinhold
b0f5179aa5 * Changed recursive_lock to use a mutex instead of a semaphore.
* Adjusted code using recursive locks respectively. The initialization
  cannot fail anymore, and it is possible to use recursive locks in the
  early boot process (even uninitialized, if in BSS), which simplifies
  things a little.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 23:12:36 +00:00
Oliver Ruiz Dorantes
96f4720393 Add into compilation remaining bluetooth components:
- server
- command tools
- H2 transport driver

Patch by Adrien Destugues and Andreas Faerber



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 21:33:22 +00:00
Ingo Weinhold
f2be4e8c4d Patch by Vasilis Kaoutsis: Fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 15:30:27 +00:00
Ingo Weinhold
d46a010c43 Patch by Vasilis Kaoutsis: Added sigpause().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 15:28:49 +00:00
Axel Dörfler
3023ab11f7 Patch by Jan Klötzke:
* Improve vm86 mode tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 12:44:56 +00:00
Axel Dörfler
9f16184577 Patch by Jan Klötzke with minor changes by myself:
* Use vm86 mode to call the VESA BIOS to do the actual mode switching by
  providing an ioctl in the vesa driver.
* Fix vm86.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 10:48:01 +00:00
Axel Dörfler
2c8b410ad5 Patch by Jan Klötzke:
* Current linking scheme does not always export arch specific symbols from the
  kernel. Merging all compiled arch stuff into a single .o file (and linking
  that to the kernel) fixes it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 10:08:07 +00:00
Axel Dörfler
d1588bb543 * Adapted the silicon_image_3112 driver to the new device manager.
* Removed std_ops(), as it wasn't used for anything, and is optional in Haiku.
* ide_isa, and legacy_sata are still waiting for the same set of changes :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 08:58:15 +00:00
Rene Gollent
585080d740 Corrected with input from Ingo. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 00:35:33 +00:00
François Revol
d4a25c07df Split isa bus manager to arch-specific part, that has been sitting here for a while...
PPC version must be fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 23:45:04 +00:00
Ingo Weinhold
0e82c8d555 Improved the "caches" command:
* List the sum of pages used by a cache tree in the line printed for the
  root cache.
* Also print the amount of committed memory per cache (and the sum for
  the tree), and allow sorting the list by it ("-c" switch).
* Added usage text.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 23:23:01 +00:00
Rene Gollent
aa9d957d57 FreeBSD build fix, please review (needed for definition of FSSH_SEEK_CUR).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 23:02:06 +00:00
Axel Dörfler
4d59d7457b Patch by James Woodcock:
* enables user-mode packet filters in the pcap library.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 15:20:29 +00:00
Ingo Weinhold
a55e32e52d * Moved fssh_lseek() out of the FSShell namespace.
* Removed debug left-over.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 13:28:58 +00:00
Axel Dörfler
2976912a51 * BaseDevice didn't initialize the fInitialized member, and thus causing bug
#2265.
* Device::InitDevice()/UninitDevice() are called from outside of the device
  manager, so they better lock it.
* Turned off debug output in devfs and the device manager.
* Fixed debug output in devfs to print the actual vnode/cookie values, instead
  of the structures the VFS passes in now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 12:04:09 +00:00
Axel Dörfler
ce2ba4187b * Added SHINTA to the list of contributors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 21:21:12 +00:00
Axel Dörfler
ef850bad9b Converted the ATA bus manager to the new driver architecture; did not test it
yet, though, as this machine takes a bit longer compiling...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 21:09:35 +00:00
Axel Dörfler
4584521e0b * PCI_mass_storage_other no longer scans the non-existing busses/disk path, but
all busses now. This should help with broken controllers that don't advertize
  their capabilities correctly.
* Maybe we want to have a list that translates some types for certain devices,
  too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 21:03:32 +00:00
Maurice Kalinowski
ac1d597e94 gcc4 build fix. Don't have default value for declaration+definition. Build is still broken...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 20:49:22 +00:00
Michael Lotz
3c72cf643a Fix extern/static declaration of usb_hid_device_* functions. Should fix GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 18:15:13 +00:00
Axel Dörfler
34d976b499 Forgot to remove now unused files.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 18:07:04 +00:00
Axel Dörfler
368167ede8 * Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
  support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
  - legacy SATA and ISA IDE support is disabled, the drivers haven't been
    ported yet.
  - The not yet used ATA bus manager hasn't been ported yet, either.
  - AHCI changes have not been tested.
  - the listdev command has been removed from the build (as it currently
    doesn't work anymore).
  - device manager generated IDs currently are not freed anymore when a device
    node is removed.
  - generic drivers can't yet use the new driver architecture.
  - simple busses that do not support device types won't work yet.
  - legacy driver publishing/unpublishing (ie. what USB needs) has not been
    tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 16:52:27 +00:00
Axel Dörfler
113a13d83e Print actual floating point number, instead of integer fraction.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 16:13:19 +00:00
Axel Dörfler
1e18692e12 * get_vnode() now accepts a NULL parameter for the fsNode argument.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-26 11:32:27 +00:00
Ingo Weinhold
61de73e29c Memory leak in error cases. CID 729.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 23:41:22 +00:00
Michael Lotz
32ab216c85 * Check for the removed case before doing any transfers.
* Cancel possibly active transfers when removed.
* Do not interpret the transfer buffer in case of an error or removal.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 22:29:41 +00:00
Michael Lotz
9e48bf8e42 Rewriting the usb_hid driver. It has now gotten a driver part and a device part
structured into the HIDDevice base class and KeyboardDevice and MouseDevice
subclasses. This can be extended easily to support more device types like game
controllers, joysticks and other HID devices. The parsing code remains untouched
while the interpretation code has been integrated into the device classes.
The driver should work much the same way as before including the boot protocol
only keyboard limitation. On the other hand composite devices that combine
multiple devices should now work, as long as they expose those devices as two
seperate interfaces.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 22:01:08 +00:00
François Revol
e26120ae27 Add char * version of ReadFrames, for compatibility with some R5 games.
Patch by genki0. I didn't see any reason not to commit it, so...
This should fix #897.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 21:45:32 +00:00
Michael Lotz
c2f077d03e * Clear the configurations list so it can safely be handled in case the device
fails to init completely.
* Fix wrong usage of realloc and check the allocations.
* Check a few more allocations, should be all now.
* Fix a small memory leaks in error case.
* Do a few more checks when unconfiguring and deleting a device so an incompletely
  initilized device is deleted correctly and does not crash or leak.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 15:11:34 +00:00
Marcus Overhagen
d53ddcce75 Provide better sense data. Turn off auto-sense
for ATAPI, as we can't report anything.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 23:08:11 +00:00
Marcus Overhagen
205acfb4dc first attempt to report sense data
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 22:34:40 +00:00
Marcus Overhagen
ad36dc4f21 Set the correct SCSI data direction mask.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 21:46:30 +00:00
Marcus Overhagen
b54c709405 Use scsi direction mask to determine if the command to execute is a write,
instead of checking every single command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 21:27:44 +00:00
Marcus Overhagen
ec5161c7b2 add more error handling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 20:40:32 +00:00
Marcus Overhagen
88bd06fbc7 Separate port and device reset. Only perform device reset during error handling if the device is busy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 20:35:22 +00:00
Marcus Overhagen
c3342cf811 added simple error handling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 19:17:17 +00:00
Ingo Weinhold
5839058aa9 Memory leak in error cases. CID 737.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:29:53 +00:00
Ingo Weinhold
d2e55e94c0 Memory leak in error case. CID 807.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:23:22 +00:00
Ingo Weinhold
a1e3759f69 Memory leak in error cases. CID 808.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:17:56 +00:00
Ingo Weinhold
cefcb7b41c Memory leak in error case. CID 872.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:07:29 +00:00
Ingo Weinhold
7ad3cf0bc3 Memory leak in error case. CID 873.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:04:57 +00:00
Ingo Weinhold
06a28b5416 BFilePanel doesn't take over ownership of the supplied messenger, so it
was leaked. CID 881.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:56:54 +00:00
Ingo Weinhold
7dd1df01f9 Fixed memory leak (though not so interesting, since the strace would
exit in this case anyway). CID 985.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:42:39 +00:00
Ingo Weinhold
9dec848f8d Fixed memory leak. Discovered by Coverity (CID 1013).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:36:25 +00:00
Stephan Aßmus
5593e6d9f6 Spotted a mistake in my previous commit, the style would still point to
the last style if the face was not found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:30:48 +00:00
Ingo Weinhold
1462a0827b Reordered the functions (private -> public). No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:27:31 +00:00
Stephan Aßmus
5b30a26b7c Added additional font face flags for "condensed", "light" and "heavy".
Our font has some extra styles and these could be picked up as the
"regular" face by accident, as witnessed by Firefox. Tracked down by
Michael Lotz. Firefox uses the correct font now for it's interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 14:54:18 +00:00
Marcus Overhagen
4f04d37ff3 Applied patch2 from bug #2243 for further testing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 14:15:13 +00:00
Marcus Overhagen
33e9755153 Small cleanup of ahci driver. Also clear the PCI interrupt disable bit during setup.
Add PCI command ID (interrupt disable) define to PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 13:40:58 +00:00
Ingo Weinhold
6607b17d6b Pimped up the "caches" command. Now it prints the caches in trees with
additional info (offset, size, used pages, areas), sorting the trees
by used pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 00:48:15 +00:00
Ingo Weinhold
5e3a974d1e * When KERNEL_HEAP_LEAK_CHECK is enabled we also store the calling
function requesting the allocation.
* The "allocations" commands does also print the caller and can filter
  by caller, now.
* Added new "allocations_per_caller" command, which sums up allocations
  per caller and prints them in a table sorted by size or count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 22:30:20 +00:00
Ingo Weinhold
91890a3258 * Moved the allocation of the static ch_randgen structure from the
open() hook to init_driver(). Unlike commented the structure was not
  allocated lazily, but with every open(), and thus leaked.
* Replaced static semaphore by a mutex.
* Reordered includes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 22:18:58 +00:00
Michael Lotz
b30304acc8 * Add a DumpFontList test that dumps all families and styles with most BFont
infos (should all be defaults expect for a few).

This shows that with our default installation there are quite a few "condensed"
styles and also an "extra light" variation. The condensed ones should probably
get their own face flag. The "extra light" and other unhandled styles should
probably not be classified as a B_REGULAR_FACE as this could lead applications
to use them in a wrong way yielding unexpected results (i.e. firefox that
picks up the "extra light" style for it's interface font).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 20:35:46 +00:00
Ingo Weinhold
fe8878faa4 Implemented unmapping of partial areas (mmap()/munmap()). Review
welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 14:00:15 +00:00
Axel Dörfler
a411c76cd6 * Added pthread_attr_setscope(), and pthread_attr_getscope(). We only support
PTHREAD_SCOPE_SYSTEM which makes the implementation rather simple.
* This closed ticket #2242.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 11:24:40 +00:00
François Revol
74be35c78b Some more funny sysconf()...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 01:38:05 +00:00
François Revol
3a17a548da - factored out [f]pathconf().
- *pathconf() now uses statvfs and fs_info data when appropriate. It should also check for file type though, some only apply to directory or others.
- added confstr(_CS_PATH) with a sensible default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 00:33:08 +00:00
François Revol
15ebab7616 *pathconf() need to call statvfs() to be more correct, but the kernel doesn't have it. Remove conf.c for now, it's likely not needed anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 00:11:07 +00:00
François Revol
ca974ded95 Some more [f]pathconf() names, not yet handled. filesizebits returns 64 though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 23:22:26 +00:00
François Revol
4f20b083aa Error in *conf() must set errno.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 23:04:11 +00:00
Michael Lotz
2d80d1b5a7 Cleanup a small leftover.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 22:08:20 +00:00
Ingo Weinhold
0f448d21e5 * Added vm_page_write_modified_page_range(), which is similar to
vm_page_write_modified_pages(), save that it only writes pages in the
  given range.
* Added vm_page_schedule_write_page_range() which schedules all modified
  pages in the given cache's range for writing by the page writer.
* Added _kern_sync_memory() syscall and the msync() POSIX function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 21:51:12 +00:00
François Revol
05ffb70e8f Add compiler version to AboutSystem so newbs can identify if an image is built with gcc4 or gcc2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 21:00:11 +00:00
Karsten Heimrich
fc0c84e771 * use the HVIF icon for the default printer folder, this will fix the black
rect arround the folder icon after setting the default printer on Haiku...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 20:38:14 +00:00
Karsten Heimrich
c749605ff1 * respect the users choise and don't show the printer panel if he does not wan't to setup a printer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 20:23:50 +00:00
Jérôme Duval
905b181d73 always clear resume interrupts
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 20:11:36 +00:00
Michael Lotz
77cc55629c Add missing api_version to usb_ecm.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 18:46:06 +00:00
Michael Lotz
5a1f43f8f0 Unconditionally report initialization success for OHCI too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 17:09:15 +00:00
Michael Lotz
c1990557b8 * Use a lazily initialized notification sem for all SendRequest() calls.
* Also use member variables to transport the status information from the
  callback instead of allocating a dedicated structure each time.
* Remove the now unused transfer_result_data struct.

This should bring down some overhead otherwise involved with sending requests
over control pipes. As this is heavily used in updating for example the hub
status (also on roothubs), this change should make the polling loop a lot
cheaper. Note that this makes SendRequest() non-thread safe, but as it is a
synchronous function (as opposed to QueueRequest) and since the underlying
architecture is not thread safe either this shouldn't be a problem (drivers
doing a SendRequest from two different threads would have failed previously
anyway). A benaphore or mutex could be employed to fix that if the need really
arises.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 16:40:33 +00:00
François Revol
6524effd4f Fix style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 16:13:09 +00:00
Axel Dörfler
403bfdda6c * The floating point output now correctly honours eventual sign flags,
and actually shows the sign (before, it would just absorb it).
* On calling floating() from vsnprintf(), the order of the "fieldWidth", and
  "flags" parameters were mixed, causing some strange output.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 15:38:09 +00:00
Axel Dörfler
15173df4e9 Last patch of the vm86 patch series from Jan Klötzke - thanks!:
* The new function vm86_do_int(struct vm86_state *state, uint8 vec) provides a
  facility to call BIOS interupt handlers. The function must only be called from
  a user thread context because the lower 1MB of the address space is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 13:54:28 +00:00
Axel Dörfler
7da0a81c0e Patch by Jan Klötzke (with additional TODO comments):
* Add a "fault_callback" to the thread structure which is called when a
  unhandled page fault happens in user space. A SIGSEGV will only be sent
  if the callback returns "true".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 12:33:30 +00:00
Axel Dörfler
ec09e0a89d Patch by Jan Klötzke:
* For vm86 mode the kernel stack top is adjusted -> do not rely on the
  kernel_stack_base + KERNEL_STACK_SIZE calculation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 12:02:30 +00:00
Axel Dörfler
bb107c4e29 Patch by Jan Klötzke:
* In vm86 mode CS will have arbitrary values so we check for both USER_CODE_SEG
  and the VM flag in EFLAGS. This is also done when entering interrupt gates.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:59:47 +00:00