Commit Graph

25745 Commits

Author SHA1 Message Date
Oliver Ruiz Dorantes
b48fa68ace Fix bluetooth_server debug window tabs, they were getting out of bounds due the index assignation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 21:03:17 +00:00
Ingo Weinhold
12c9f1761f * Added thread block type constant for rw_locks, so that they are listed
correctly by the "thread" and "threads" debugger commands.
* Added "rwlock" debugger command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 20:43:40 +00:00
Oliver Ruiz Dorantes
0f9aa9c245 Patch by Fredrik Ekdahl. Fix tabs and whitespaces, this set of files were conflicting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 19:55:13 +00:00
Oliver Ruiz Dorantes
ded3259257 Patch by Fredrik Ekdahl. Fix tabs and whitespaces
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 19:51:16 +00:00
Ingo Weinhold
9a0fc9a874 In cache_io(): Don't keep the cache locked while doing a
user_{memcpy,memset}(), since that can cause a page fault, which needs
pages and might try to steal some from our cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 19:23:17 +00:00
Ingo Weinhold
b627c47932 IORequest::Advance() would access the vec array out of bounds after
advancing to the end of the request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 14:22:52 +00:00
Stephan Aßmus
97d52f8e2a Make the peak display automatically go back down for the max peaks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 13:33:37 +00:00
Axel Dörfler
f9ae429701 * Replaced our SinglyLinkedList with one that has a similar interface as the
DoublyLinkedList. Not yet tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 11:47:17 +00:00
Axel Dörfler
850b759925 * Updated the fs_shell version of DoublyLinkedList.h to contain the latest
fixes made by Ingo. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 11:21:47 +00:00
Stephan Aßmus
d666a89e8f Check for index < 0 too for B_BAD_INDEX. This fixes for example Tracker-Grep
which does

message->GetInfo("field", &type, &count);
while (message->FindBlah("field", --count, &...) == B_OK)
	...;



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 10:54:08 +00:00
Axel Dörfler
274e684a8e * bfs_rename() did not write lock the moved inode, but only its former and
new parent directories. This would only be necessary in case it's a directory,
  but we do it always now.
* This fixes bug #2556.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 07:41:58 +00:00
Ingo Weinhold
cc2da70688 vfs_{read,write}_pages() have an additional parameter now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 23:55:30 +00:00
Ingo Weinhold
7f12cc54a7 * It is now supported that I/O operations and requests are only handled
partially (e.g. due to hitting the end of file). The respective
  classes have grown new methods and attributes to deal with that. The
  "finished" callbacks have got additional parameters to indicate
  whether the transfer was only partial and how much has been
  transferred. Other callbacks and functions have a size_t* in/out
  parameter instead of a simple size_t, now.
* vfs_{read,write}_pages() do now use the I/O request framework instead
  of the underlying FS's {read,write}_pages() hooks (those should be
  unused now). Furthermore they've got an additional "flags" parameter,
  which is passed to IORequest::Init(), i.e. it allows to specify that
  the given vecs refer to physical addresses.
* The file cache's read_into_cache() reads directly into physical
  pages, now.
* Fixed bug in DoIO::IO(): The offset was not adjusted, so that all
  pages were incorrectly transferred from/to the same location.
* Fixed broken subrequest scheduling loop head in
  do_iterative_fd_io_iterate().
* Adjusted the test driver and implemented its io() hook. Using this
  driver I/O requests are passed all the way from the VFS/VM to the
  driver and through the I/O scheduler. It even seems to work. :-)
* Added missing const to the iovec* parameter of the IORequest::Init()
  methods.
* Disabled some debug output by default. Added new optional debug
  output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 23:34:10 +00:00
Karsten Heimrich
df24dede80 * rename InterfaceUtils.h/cpp to BlockingWindow.h/cpp and adjust includes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 21:24:19 +00:00
Karsten Heimrich
1bf69d91a3 * remove all classes that where only used in pdf writer from InterfaceUtils
* get rid of three of them, i don't know why they where implemented in the first place

* fix broken scrollbar adjustment
* cleanup DocInfoWindow.h and DocInfoWindow.cpp
* make the window resizable and get rid of the tabview



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 20:32:10 +00:00
Axel Dörfler
b99521f213 First round of locking fixes:
* Moved locking the data stream out of the BPlusTree methods; this fixes at
  least two locations where another thread could have seen outdated/incorrect
  data.
* Removed some superfluous code in bfs_rename(): we don't have to revert to the
  previous situation, the transaction does this for us automatically.
* Added a simple MultiWriteLocker, even though it's not really necessary anymore
  (since we always hold the transaction lock first when we lock more than one
  inode at a time).
* Inode::Create() called InodeAllocator::Keep() a bit too early, the file cache
  and map wasn't created and assigned yet.
* InodeAllocator now keeps the inode write locked.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 18:32:14 +00:00
Oliver Ruiz Dorantes
e16deeff23 Fix: Returning always error at submitting acl RX frames(Mika Lindqvist)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 16:51:06 +00:00
Axel Dörfler
f5d5ca18f6 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 16:29:57 +00:00
Axel Dörfler
37de5a0d83 * The rw_lock now behaves just like a recursive locker if KDEBUG_RW_LOCK_DEBUG
is defined to 1; this allows asserting the read lock case, too.
* Added ASSERT_{READ|WRITE}_LOCKED_RW_LOCK() macros. The read assertion is only
  working when KDEBUG_RW_LOCK_DEBUG is defined to 1, the write assertion works
  always.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 15:27:58 +00:00
Stephan Aßmus
87b8310c0f The ClippedLineTest now runs for 5 seconds max (should change the other tests
accordingly and refactor a bit). It also prints the number of clipping rects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 11:40:18 +00:00
Axel Dörfler
0b46f622d1 * Made struct ring_buffer public (within the kernel).
* Added "syslog" command that dumps the contents of the syslog ring buffer into
  KDL. Use the '-n' option to only show what hasn't been sent to the syslog
  daemon yet.
* When entering the kernel debugger, the current thread ID and name are also
  printed (not only the current CPU).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-30 10:03:22 +00:00
Stephan Aßmus
b4e9c99bc4 * Added a SetupClipping() method to Test baseclass, which adds about 400
small clipping holes to the TestView user clipping.
* Added a bunch of new tests. Here are some numbers from the test environment,
  which is similar to running Haiku in VESA mode:

Horizontal lines per second:
Haiku:	192964.663	(117,7%)
ZETA:	163977.006

Vertical lines per second:
Haiku:	 90109.985	(276.9%)
ZETA:	 32538.458

Random lines per second:
Haiku:	  7998.451	(23.1%)
ZETA:	 34602.539

Random colored lines per second:
Haiku:	  7976.437	(22.9%)
ZETA:	 34788.247

Random clipped lines per second:
Haiku:	   262.180	(2.5%)
ZETA:	 10394.794

Clipped glyphs per second:
Haiku:	  5911.526	(1.0%)
ZETA:	590508.726

Obviously the clipping performance is a punch in the stomache.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 21:12:48 +00:00
Stephan Aßmus
7b0cfaa569 No space between copyright notice and header guard.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 20:07:10 +00:00
Stephan Aßmus
3cb3e0e210 * Fixed coding style issues pointed out by Axel
* Use more letters of the roman alphabet (doh...)
* Tested drawing mode is currently B_OP_COPY


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 19:03:38 +00:00
Stephan Aßmus
7c2658585f The start of a benchmark application to test various performance questions
of the Haiku app_server. The immediate comparison are of course BeOS and ZETA.
Currently, it measures the performance of drawing untransformed text. For
now, I have only tested on ZETA and the app_server testing environment. Will
let you know my findings with Haiku running on real hardware.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 16:41:19 +00:00
Axel Dörfler
d06cc6e386 * Unmounting a volume didn't wait for the block allocator's initializer thread.
* This fixed bug #2541.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 16:26:47 +00:00
Ingo Weinhold
e9c954c387 Use file_map_translate() instead of bfs_get_file_map().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 13:54:43 +00:00
Axel Dörfler
188233b954 * Removed execute property - I wonder why this file is located in this directory,
though; it shouldn't be in here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 12:44:24 +00:00
Axel Dörfler
47ca7595ca First patch by Salvatore to implement XSI semaphores with a few changes
by myself:
* renamed xsi_do_undo() to xsi_sem_undo() (there is more to XSI than sems).
* Fixed coding style issues in sys/sem.h and xsi_sem.cpp.
* Added _kern_*() syscall prototypes to syscalls.h.
* Added a TODO in xsi_sem.cpp and xsi_semaphore.h about moving union semun to
  a shared header.
* Made the team::xsi_sem_undo_requests int32 - due to padding, it would have
  needed 4 bytes anyway; please always use specific types over int/short/long.
* xsi_sem_undo() now checks if it needs to do anything - the calls in team.cpp
  no longer needs to do this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 12:03:41 +00:00
Ingo Weinhold
ecc1c87fc7 IORequest::CreateSubRequest() didn't return the created subrequest, nor
did it set its parent request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 01:53:14 +00:00
Ingo Weinhold
8cc3c74406 The "cvar" command wasn't happy with private condition variables. Now we
don't check any longer whether the given number is the address of a
condition variable in the global hash table; we just assume it is a
valid condition variable pointer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 01:52:20 +00:00
Ingo Weinhold
fe00c1a5ea AutoDeleter calls the destructor operator also when the object is NULL,
so we need to check for that explicitly in the CObjectDeleter and
MethodDeleter cases.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-29 01:48:38 +00:00
Ingo Weinhold
cfae07b6ac Added kernel private vfs_vnode_io() which performs an io_request on a
vnode (falling back to synchronous I/O if the io() is not supported).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 23:46:50 +00:00
Ingo Weinhold
344150c171 Implemented the io() hook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 23:37:21 +00:00
Ingo Weinhold
7e3c202478 Added fssh_volume_for_vnode() and fssh_do[_iterative]_fd_io() to the
FS shell. The latter two lack an implementation yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 23:36:08 +00:00
Ingo Weinhold
7df40c23f6 Added handy function volume_for_vnode() which returns the fs_volume for
a given given fs_vnode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 23:33:49 +00:00
François Revol
db191ade9a Only add symlinks to x86-only libGL on x86, else it obviously gives an error because of missing arg.
Why is libGL x86-only anyway ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 22:13:34 +00:00
Stephan Aßmus
e196501316 The Y check can be moved out of the loop of course, why didn't I see this
before?! Is about 4% faster than before. If anyone sees a way to make it faster
yet, please shoot! I can watch movies fullscreen on a 2 GHz Core 2 Duo in
VESA with bilinear scaling, but it would be nice to use less CPU... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 21:30:26 +00:00
Oliver Ruiz Dorantes
2011fa73d0 Fix the setting of special flags for bcm2035 device
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 19:19:09 +00:00
Stephan Aßmus
162a7f5f8e * Implemented new BView drawing functions DrawBitmap[Async](
const BBitmap* bitmap, BRect bitmapRect, BRect viewRect, uint32 options).
  Only option so far is B_FILTER_BITMAP_BILINEAR.
* BView::DrawBitmap[Async](const BBitmap* bitmap, BRect viewRect) was accessing
  the bitmap pointer without checking it. Would therefore crash when passing
  NULL, unlike the other methods.
* The BPicture code already reserved room for the BBitmap flags, but did not
  store the actual flags and neiter use them for anything. Since the bitmap
  data is stored anyways, the bitmap creation flags do not matter. So I reused
  this for the new bitmap drawing options.
* Rewrote Bitmap.h and removed the B_BITMAP_SCALE_BILINEAR flag again.
* Tried to optimize Painter::_DrawBitmapBilinearCopy32() a little by giving
  the compiler better hints. There seems to be a marginal, possibly imagined
  speed increase < 0.05 ms. ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:58:30 +00:00
Stephan Aßmus
42ed4fd712 Rearranged includes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:51:57 +00:00
Stephan Aßmus
3c7dd7c346 Added const versions of the methods that should have been declared like
that from the start. Please review for possible binary compatibility problems!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:50:07 +00:00
Stephan Aßmus
749a3c1ee3 Scrollbars do not need a pointer history.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:43:47 +00:00
Stephan Aßmus
1c111165b0 Cleanup only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 16:27:13 +00:00
Ingo Weinhold
bb94d91d07 Implemented the devfs io() hook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 14:29:49 +00:00
Ingo Weinhold
0ff0056d54 Added IORequest::SetOffset().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 14:28:55 +00:00
Ingo Weinhold
d3374bdc15 Reverted most of r26641.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 13:14:37 +00:00
Stephan Aßmus
7832e54913 Use #ifdef instead of #if
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 12:01:15 +00:00
Stephan Aßmus
28291e331b * Forgot the case in the filter loop where only the top and bottom pixels
need to be interpolated because the x index is right on a source pixel. This
  prevents the out of bounds access for the second to last row in the last
  column. Also the rightmost pixels where incorrectly interpolated with the
  leftmost pixels of the next row. And it actually helps speed too of course.
* Added a compile time option to allocate the filter weighting and index
  caches on the heap instead of the cache. I am not sure if it is a problem
  though, I recall Haiku threads have quite a lot of stack space. The needed
  memory depends on the target size. For a screen with 1920x1200, the caches
  would need 12.5 KB. Allocating them on the stack saves about 0.2 ms on my
  test system. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 11:28:19 +00:00
Ingo Weinhold
ec598fe493 * Added FS interface hooks io() and cancel_io(). The former is supposed
to provide asynchrounous (or only synchronous, if asynchronous is not
  supported) I/O request support. It will eventually replace
  {read,write}_pages(). None of the FS implementations implement them
  yet.
* Implemented some support functions for request-based I/O. File system
  implementations can use do_fd_io() which passes an I/O request to the
  layer responsible for a given FD, and do_iterative_fd_io(), which
  translates a request for a file to subrequests for the underlying
  device and passes them on. Both fall back to synchrounous processing
  when the io() hook is not supported.
  Furthermore added vfs_synchronous_io() which should be handy for the
  devfs to perform io_requests synchronously for devices that don't
  support the io() hook.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 02:07:20 +00:00