Commit Graph

25242 Commits

Author SHA1 Message Date
Jérôme Duval
f67bbdb2a6 fixed warnings
use playback rate as preferred rate (instead of record)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 21:31:14 +00:00
Stephan Aßmus
264df95726 All input device add-ons should already do this, but make sure that
mouse messages have a "when" field with the event system time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 20:29:18 +00:00
Stephan Aßmus
d36ae78cc6 Added two tests:
* statusbar was used to test and improve some BStatusBar behavior
* lagging_get_mouse demonstrates what the problem is with older
  applications using synchronous GetMouse() calls without specifying
  that they actually don't care about mouse history.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 20:01:31 +00:00
Oliver Ruiz Dorantes
48cca06a81 Add new virtual method in the delegates to launch the device, Instantiation meant only to open/register the localdevice
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 18:39:41 +00:00
Stephan Aßmus
6be60b2d19 Applied patch by Jan Kloetzke:
The PUSHF/POPF instructions were not emulated correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 18:25:45 +00:00
Stephan Aßmus
fc8e77f863 When a BBitmap is drawn with scale, but also only partly, the inverse
image scan generator matrix was calculated wrongly. The part of the offset
that lies within the bitmap bounds needs to have the scale applied as well.
Maybe this code can be simplified. Appearantly there is not a lot of code
that uses BBitmap drawing this way, perhaps because the R5 version has had
issues with rounding. But MediaPlayer uses this feature for drawing the peak
levels and this is fixed by this change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 17:48:30 +00:00
Stephan Aßmus
93016537eb Check if the Painter even has a clipping region set before trying to take the
short cut when no text needs to be rendered. I've seen a crash yesterday in
the app_server test environment when the decorater was drawing something,
although it may also have been because I had a screwed up objects folder
where some objects were not recompiled because I am switching back and forth
between two app_server code folders.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 17:41:15 +00:00
Stephan Aßmus
bafcc63bcc This is either a fix or a workaround for a problem in Pe, where the
application modifies the scrollbars one by one and the changes would
have some weird cyclic effect where the constrains of one scrollbar
affected the scrolling already while they would be lifted afterwards.
It sounds weird, but maybe it is simply a resulting behavior of the
BeOS implementation which does not check the scrollbar restrictions
in the BView code. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 17:21:39 +00:00
Jérôme Duval
81a7dedd6b init buffer_cycle
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 16:41:52 +00:00
Ingo Weinhold
65748dc8d9 Remove() was moving an additional array element. Mostly harmless, but
would cause a crash when the array end was page-aligned and the next
page was not accessible. Happened to me during a "rm -rf ...".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 16:15:41 +00:00
Axel Dörfler
1bde8b03e7 * Replaced BFS's ReadWriteLock implementation with the kernel's rw_lock.
* The BlockAllocator now uses the new mutex_transfer_lock() function instead
  of clobbering the mutex directly.
* Removed Lock.h - it's no longer needed.
* Minor white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 08:04:37 +00:00
Axel Dörfler
78b32dd026 * The rw_lock is now able to nest read/write locks when you have a write lock.
It follows the semantics of the BFS R/W lock, though, that is, if you unlock
  your write lock before the read locks, the read locks effectively become
  write locks, too.
* Added a mutex_transfer_lock() function that will allow you to unlock a mutex
  in a different thread than the one which locked it (only matters if KDEBUG
  is enabled, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 07:56:49 +00:00
Michael Lotz
f90a5e346d Adding bus_barrier macro to compatibility layer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 21:52:40 +00:00
Oliver Tappe
a042907733 * removed debuggin leftover
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 21:06:04 +00:00
Jérôme Duval
b5f75a7ec8 forgot to close the stream before deletion
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 20:45:54 +00:00
Karsten Heimrich
685483eada * set the what field to okok on success, as the epson returns 'Good' for some reason
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 20:04:03 +00:00
Karsten Heimrich
c5ea3d591d * rearranged header a bit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 20:01:46 +00:00
Karsten Heimrich
a836d47d56 * cleanup, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:39:10 +00:00
Karsten Heimrich
30cf4e6a54 * revert the last change as we can get stop etc. also
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:23:40 +00:00
Karsten Heimrich
7630cacab6 * check against baad as e.g. the epson addon does not return okok on success
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:14:08 +00:00
Karsten Heimrich
f56301c9e8 * maintain our own rect while printing, this makes it possible to print all pages e.g. syslog from StyledEdit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:10:39 +00:00
Oliver Tappe
3ad86c7ff5 Fixed R5 compatibility "layer" in libnetwork:
* instead of always converting from the expected r5_sockaddr_in to haiku's own,
  we now explicitly check whether or not the given sockaddr is an r5_sockaddr_in
  or not, naturally doing the conversion only if it is. This is necessary since
  even R5 applications may not always pass in r5_sockaddr_in structs (as for
  instance gethostbyname() will return a native [haiku-]sockaddr_in)
* cleaned up the confusion between the name r5addr and it's actual meaning
  (holding a haiku sockaddr_in) - renaming it to haikuAddr instead
* undid the part of Ingo's r25489 described as: "Extended R5 compatibility 
  check to also consider calls from libbnetapi" - as I fail to see why this
  would be desirable and in fact it stops at least Beam from working.
  Ingo: if you can remember, please enlighten me what was the reason behind 
  this change.
This finally makes Beam "work" (well: connect to servers and download mails ;-)
Vision, NetworkTime and NetPositive are still working, too, so hopefully there
are no regressions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 18:53:01 +00:00
Axel Dörfler
06d5e1b3b6 * Added ReadLocker/WriteLocker classes to auto lock an rw_lock.
* Added *_init_etc() functions to the fs_shell.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 18:12:33 +00:00
Axel Dörfler
e2dfe00484 * Replaced most of the error enums with #defines.
* fssh_auto_locker.h should probably better use an FS-Shell header instead of
  stddef.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 18:10:21 +00:00
Axel Dörfler
846f4fa2ab * Work-around for the KDEBUG "holder" mechanism; we actually want to lock the
mutex in another thread here than we will unlock it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 16:34:38 +00:00
Axel Dörfler
e0fc5e7380 * The fssh_auto_locker.h header was not self-contained.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 16:26:57 +00:00
Axel Dörfler
03fa417b70 * Removed the home-brewn locking classes in BFS besides the read/write lock
(for now).
* Inode::fSmallDataLock is now a recursive_lock, Journal::fLock is now
  a recursive_lock, too, Journal::fEntriesLock is now a mutex, as is
  BPlusTree::fIteratorLock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 16:21:00 +00:00
Axel Dörfler
af370c702a * Added a recursive_lock_trylock() function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 16:17:34 +00:00
Axel Dörfler
589f1a9133 * Made the private kernel locking primitives available to file systems as well.
* Applied Korli's mutex_unlock() fix to block_cache.cpp.
* Removed block_cache_priv.h, as it's no longer needed (moved its definitions
  into block_cache.cpp, as in the kernel file).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 15:19:19 +00:00
Axel Dörfler
36bf05cac9 * Added a lock to FileMap - since the map is retrieved lazily, and file
systems like BFS only hold a read lock when reading the map, accessing the
  file map wasn't safe.
* Made FileMap::Free() private, and renamed it to _Free().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 12:53:53 +00:00
Axel Dörfler
92c3ae2b69 * Reverted r26293 again, as that "subtle" change also prevented any device I/O
from happening...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 12:45:38 +00:00
Axel Dörfler
bed8516acc * file_{read|write}() now only accept regular files, and will return either
B_BAD_VALUE or B_IS_A_DIRECTORY depending on the vnode type.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 12:27:37 +00:00
Axel Dörfler
469c26e738 * Since we now have a vnode::type field, several calls of read_stat() were no
longer necessary.
* Optimized file_seek() using this field, too; reading the stat is now only done
  when necessary.
* file_read() and file_write() will now return B_IS_A_DIRECTORY so that not
  every file system has to care about that particular error code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 12:24:24 +00:00
Axel Dörfler
52ecda6ecf * Added some optional KDL command and statistics to the file map implementation.
* Turned them on for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 12:02:24 +00:00
François Revol
0cd3ea3e50 ...and the correct struct name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 11:31:40 +00:00
François Revol
26e45f0523 Would work better with the definition...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 11:30:12 +00:00
François Revol
30145fa1fd - handle the supervisor bit from SR correctly on iframes
- various notes on 060 vs others:
	- 060 has 040 compatible mmu, except pgtables must *not* be on copyback memory
	- 060 has a processor control reg which has a revision number to use in system_info
- notes on ctx switch:
	- must be kept in sync with asm code
	- fsave generate variable size frames, so reserve space and use non-predecrementing EA.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 11:22:26 +00:00
Axel Dörfler
9dcc2929fa * Made a class FileMap from struct file_map.
* Added two TODO comments to the start of the file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 11:16:50 +00:00
Stephan Aßmus
62bf33df96 Don't reset the window size when playing a new file if it isn't necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 08:33:03 +00:00
Stephan Aßmus
591f4c05bc Remove the negative delay that was supposed to account for client->app_server
delay. The audio is later than the calculated realtime anyways, I suspect
the OSS Node does not advertise it's latency 100% correctly yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 08:32:17 +00:00
Michael Lotz
432e3df3c7 * Change the fixed bin list to a generated one based on a few constraining
factors per heap class. The previous bin sizes would in many cases just have
  wasted memory by not fully using up the available space while not providing
  any more elements than a bigger size. The computed bins ensure that the best
  sizes are used based on a min count, min size, alignment and max waste per
  page. Also changed the heap sizes to more reasonable values and renamed them
  to small, medium and large.
* Remove the shouldGrow parameter from heap_memalign() and just check it using
  heap_should_grow() where appropriate.
* Fix readding a nun-full area to the area list, the added page count can be
  bigger than one, therefore the check must be free_page_count == pageCount.
* Simplify ensuring correct alignment, just aligning the size instead of
  checking each candidate bin for alignment is enough.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 01:09:41 +00:00
François Revol
1308815ba3 Fix scope for gcc4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 20:23:25 +00:00
Jérôme Duval
df709516a0 moved stateStatus read/write out of the interrupt handler
added some error verbose


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 19:20:03 +00:00
Stephan Aßmus
4a684bb832 That is more likely to give the right realtime...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 18:32:28 +00:00
Stephan Aßmus
9282400ff4 * The SeekSlider did not update the knob when it was resized.
* Subtile visual improvements to the SeekSlider.
* Added a PeakView for displaying the audio peaks that are produced by
  the AudioProducer.
* A MessageEvent can now directly take a custom BMessage for delivery.
* The peak notification mechanism is a bit separate from the rest of the
  Controller notification design, since the notification delivery should
  be delayed until the audio is actually audible. I may change this
  quick and dirty design though, since it is not so nice. The target
  time could also be part of the message and be handled at a different
  stage, but that would make it less efficient.
* Layout improvements to the playback controls.
* Code cleanup here and there, changed some license statements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 18:29:42 +00:00
Ingo Weinhold
e146a7bf2f Also print the indices of stack frames. This makes the "call" command
more convenient to use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 15:32:40 +00:00
Karsten Heimrich
ba18b05b5d * Fixed broken archive functionality, before we would not archive subitems
and store the archived items in the wrong message field. Verified on R5.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 14:46:06 +00:00
Oliver Tappe
7da7c45951 * when finding out whether or not R5 compatibility mode is required, we may have
to scan loaded libraries, too, as the dependency on network libraries may not
  be present in the executable image, but may be "hidden" in one of those
  library images (as is the case with Beam).
  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 13:50:28 +00:00
Karsten Heimrich
d2805ca9aa * Archive the thread priority as well, it can be found in an R5 archive if Run() was called.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:34:47 +00:00
Karsten Heimrich
cd6265ec4d * don't leak fTrack
* fixed broken while loop
* call _InitObject also from the archive constructor
* just noticed while trying to load the R5 epson printer driver, still not working...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:26:14 +00:00