Commit Graph

20827 Commits

Author SHA1 Message Date
Ingo Weinhold
279c6b76dc * Use condition variables when waiting for busy pages or busy caches.
* Removed a few instances where the page state was set busy directly after 
  allocating it. This is a no-op, since a page is always busy after 
  allocation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 20:08:25 +00:00
Ingo Weinhold
227402f2bf Added simple condition variables to the kernel. They are a relatively
cheap means to block threads until notified explicitely.
threads 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 20:03:17 +00:00
Ingo Weinhold
bce7e9f695 * Added AutoLocker instantiations IterruptsLocker (disables/restores
interrupts) and SpinLocker (acquires/releases spinlocks).
* Adjusted Jamfiles of components that used <util/AutoLock.h> but didn't
  add all header directories required now (<int.h> was added).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 19:47:22 +00:00
Ingo Weinhold
5378efc0db New rule UsePrivateKernelHeaders. It adds header/private/kernel as well
as all directories that might be needed by private kernel headers (arch,
platform,... headers).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 19:42:21 +00:00
Ingo Weinhold
c100c71354 Remove mpu401 driver from the netboot archive.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 19:40:19 +00:00
Stefano Ceccherini
db5b3a0249 TermWindow didn't set the colors correctly on Terminals in a new tab.
Now TermWindow::_SetTermColors() accepts a pointer to a TermView to fix 
that.
Spotted by Andrea Bernardi. Thanks! 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 10:35:08 +00:00
Stephan Aßmus
fe914c98b4 * added a version of SetFont() that takes a DrawState* to DrawingEngine and
Painter, that is needed to be able to tell if anti-aliasing is to be used,
  since the flags in the font can be overruled by the flags in the view...
* fixes aliased fonts reliably, tested with FontDemo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 09:48:28 +00:00
Stefano Ceccherini
98eadf4b9d Scrolling didn't work correctly if the user didn't move the mouse all
the time. Fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 09:38:19 +00:00
Stephan Aßmus
05357ae700 Fixed an interesting bug in the app_server, after beating my head against
this for a long time... what happens when the app_server has requested a
redraw, but the client sends some drawing commands before starting the
redraw session? This would be the case, for example, when TextViews got
notified of their parent window becomming active (they would invert the
selection outside of any update session). When there was an additional
expose event, the app_server would already have the background cleared, so
the lonely "invert" command would invert the freshly painted background. Then
the normal Draw() of the TextView would be called because of the expose event.
By the time the text was rendered, it was rendered on the inverted background,
then the normal Draw() contained another "invert" command to invert the
region of the selection. Thus inverting just the text, and the background
twice. Solution:
* introduced a special handling for drawing commands arriving between
  requested update session and beginning of that session: the pending
  update region is clipped from the region the client is allowed to draw in.
* fixes funny text rendering in the selected part of text views. For example
  ticket #908.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 00:33:50 +00:00
Stephan Aßmus
e83f8dc9a0 Didn't I have a bad feeling because of code duplication?
* fixed a bug in the font cache, the signature was generated in one way
  (rendering type) while the initialization of the font engine could
  use another way
* should fix non-antialiased straight text
* weird non-transformed text in FontDemo
* generally not using vector glyphs when it was supposed to use them (rotated
  or sheared text, or non-antialiased text)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 00:25:52 +00:00
Axel Dörfler
a2057fac93 Since get_memory_map() can run with interrupts turned off, it can't put up
it's reference to the vm_address_space - luckily, it doesn't even need a
reference, since it always runs in the current address space, which cannot
go away for obvious reasons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 23:51:20 +00:00
Axel Dörfler
1260fa6595 fCachedStack needs to be initialized and reset when the looper is unlocked.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 23:11:13 +00:00
Axel Dörfler
eaad52e8d7 Now uses the cache stack trick for a cheaper check_lock() version as suggested by stippi.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 22:43:52 +00:00
Axel Dörfler
69bee56c3b * get_memory_map() leaked vm_address_space references
* fixes a dead lock in vm_soft_fault() - the locking scheme enforces you to
  lock the address space before a vm_cache, not the other way, around. Since
  we need to lock the cache that has our page in fault_get_page(), we violated
  that scheme by relocking the address space in order to get access to the
  vm_area. Now, we read lock the address space during the whole page fault;
  added a TODO that explains why this might not really be desirable, if
  we can avoid it (the only way would be to reverse that locking scheme
  which would potentially cause the more busy vm_cache locks to be held
  longer).
* vm_copy_area() uses the MultiAddressSpaceLocker, but actually forget to
  call Lock() on it...
* delete_area() leaks vm_address_space references - but fixing this currently
  causes other problems to be investigated; I'll open a bug for that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 22:38:46 +00:00
François Revol
e0475f8f7e Fix building with TRACE
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 21:44:30 +00:00
Michael Pfeiffer
f93d6bd89e * Implemented run_add_printer_panel(). Opens Printers preflet and sends to
it the message for opening the 'Add printer dialog'.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 20:48:06 +00:00
Stephan Aßmus
ee5180067d * the black SVG version now includes the dropshadows as bitmaps, which, given
that they are blurry anyways, should give you a perfectly scalable version of
  the logo in SVG


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 20:33:36 +00:00
Michael Pfeiffer
3f4090c83d * open 'Add printer dialog' when 'addp' message is sent to Printers preflet
* style changes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 20:32:46 +00:00
Jérôme Duval
5851156445 updated DejaVu fonts to to 2.19
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 20:07:40 +00:00
Jérôme Duval
b028e77473 Updated to version 21 of the Konatu font.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 20:06:38 +00:00
Stephan Aßmus
bbc424771b * convert shape coordinates to screen at the time of playing the picture
(fixes ticket #1367, stefano I thought you knew that I meant this in an
  earlier mail)
* move_pen_by() looked wrong in ServerPicture, have not tested though
* make sure the pen location is adjusted after stroke_line() and draw_string()
  in ServerPicture
* set_pen_location() does not need to update the Painter drawing state
* ServerWindow AS_LAYER_SET_PEN_SIZE needs to set the resulting pen size of
  the drawing state stack, not the one set on the current state
* ServerWindow AS_LAYER_GET_PEN_SIZE needs to return the current state's
  size, not the result of the stack
* small cleanups


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 18:36:23 +00:00
Michael Pfeiffer
eb85607872 Bug #1092 (PCL6: Second page upside down in duplex mode) fixed by Dr.
Hartmut Reh.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 18:33:59 +00:00
Stephan Aßmus
a748b927a5 * make sure that the pattern used for line arrays is B_SOLID_HIGH
and that the previous pattern is restored after execution


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 18:30:28 +00:00
Stephan Aßmus
aaa42c7e22 * added a way to get the unscaled pensize (ie that of the current draw state
of a view)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 18:29:09 +00:00
Niels Sascha Reedijk
8a44618225 Create framework for Application Kit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 10:29:30 +00:00
Stefano Ceccherini
d6f28abebe Added a popup menu to the tabview: for now it only contains a "close
tab" item. Note that you can also close the tab by clicking on it with 
the tertiary mouse button. Renamed some methods of TermWindow.
I'm not really happy with this code (tab creation/deletion code is 
spread between TermWindow and SmartTabView), I will need to come up with 
something better.
There are still some visual glitches when tabs are switched, created or 
deleted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 09:50:01 +00:00
Stephan Aßmus
7f8d0be06f * fix ticket #1365, isinf(x) -> isinf(value)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 09:14:38 +00:00
Axel Dörfler
5af1dda793 bonefish+axeld:
* Removed the ref_count from vm_areas. You now always need to have the address
  space locked (read or write, depending on what you do) when dealing with
  areas.
* Added helper classes for locking the address space: AddressSpace{Read|Write}Locker,
  and MultiAddressSpaceLocker which can lock several spaces at once and makes
  sure no dead locks can happen.
* resize_area() is now using the MultiAddressSpaceLocker instead of no locking
  at all; ie. it should now be safely to use.
* Disabled transfer_area() for now; it will be changed to work like an atomic
  clone_area()/delete_area(), that is, it will hand out a new ID for the
  transfered area.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-07 21:46:58 +00:00
Axel Dörfler
7e188a5b4b Now prints a more detailed message in case the kernel stack couldn't be created.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-07 01:54:08 +00:00
Axel Dörfler
277bea40a3 rectArray can only be NULL in case fAsString is true, not the other way around; this fixes
ServerFont::GetBoundingBoxesForStrings() (ScreenSaver no longer crashes as reported by Brian
Verre on the mailing list).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-07 01:24:09 +00:00
Jérôme Duval
2c4a38ab01 usb devices and vendors list from NetBSD version 1.480
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 23:29:54 +00:00
Stephan Aßmus
fc0369ec27 * added the Haiku logo with white and black letters as SVG. This does not
have the nice drop shadows, so it's only meant to be helpful to reproduce
  the logo in other graphics packages, but it's not the real logo!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 18:54:20 +00:00
Stephan Aßmus
4971740e39 * in FillRegion(), check if the current drawing mode is B_OP_INVERT,
and then use hardware acceleration... found out this is what our
  BTextView is actually using, that's why it never used hardware
  acceleration for invert rect/region before. Have not tested this on
  real hardware yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 18:50:44 +00:00
Stephan Aßmus
90ad4da30d * small cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 18:49:11 +00:00
Ingo Weinhold
2ac748daf1 * Changed the signatures of fault_get_page() and fault_find_page(), so
that an error can be propagated back to vm_soft_fault().
* Added boolean restart reference parameter to fault_find_page() which
  is set to true whenever a condition is it encountered that requires
  to start fault_find_page() from the very beginning. fault_get_page()
  checks the flag and executes fault_find_page() in a loop, now.
* Removed the panic()s+TODOs in fault_find_page() when a cache became
  busy. The restart feature is used in this case.
* fault_find_page(): If after the loop we haven't found a page yet,
  and after locking the right cache one turned up, we restart the
  function, too, thus avoiding double insertion of a page into a cache.
* Fixed potential dead-lock in fault_get_page(): After inserting a clean
  page into a cache other than the top cache (read fault on
  copy-on-write area not backed by a file (e.g. the heap)) the dummy
  page was removed from the to be locked top cache while we still held a
  lock for the lower cache, thus inverting the locking direction
  required by the cache locking policy (top -> bottom).
* fault_get_page(): In case of a write access and a readable page found
  in a lower cache, vm_cache_remove_consumer() could have replaced our
  dummy page with a real page from a collapsed lower cache while we
  had unlocked both caches. We didn't check for this condition and
  always inserted our freshly allocated page, thus potentially inserting
  a duplicate page into the top cache. We do the check now and discard our
  page, when another page turned up. Fixes bug #1359.
* fault_get_page(), same if block: Removed unused case for removal of the
  dummy page from a non-top cache. We only ever insert it into the top
  cache and it should not be moved to another cache. Added an assert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 18:06:01 +00:00
Jérôme Duval
e00976b95c now behaves like the BeOS version
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 18:03:52 +00:00
Jérôme Duval
902067dc62 added a test for confstr()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 17:43:59 +00:00
Ingo Weinhold
cf1539e1a3 Added debug macros ASSERT_ALWAYS_PRINT and ASSERT_PRINT which take
additional parameters that are fed into a dprintf() before panic() is
invoked.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 17:35:57 +00:00
Niels Sascha Reedijk
99b3aeed2d git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21837 a95241bf-73f2-0310-859d-f6bbb57e9c96 2007-08-06 14:28:40 +00:00
Stefano Ceccherini
e9d1494da3 Nevermind Stephan, in the end I found it out. Fixed shape drawing inside
a BPicture, though I'm not yet sure if I should do it there on when 
playing the picture...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 11:55:29 +00:00
Stefano Ceccherini
1f8ea6a98d Set the origin before playing the picture, so DrawPicture() with an
offset works correctly. Drawing a BShape using a BPicture is currently 
broken. Stephan, any insight on what it's changed about shape drawing ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 11:41:18 +00:00
Stephan Aßmus
fe80954c2d * patch by Andre Garzia to fix some coding style issues
* fixed a potential memory leak in EthernetSettingsView::_ShowConfiguration()
  when the ioctl didn't succeed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 09:46:42 +00:00
Niels Sascha Reedijk
55f7db1bd9 Update according to the latest guideline changes. These files already
passed phase 3, so they wouldn't be updated during the regular process. 
I guess the other files will get that update.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 09:32:27 +00:00
Niels Sascha Reedijk
ff3d9bfa2a Update the API guidelines to make them more consistent with the coding
guidelines. Three new guidelines:
- Commas between names and email adresses in header blocks.
- Indent with tabs (with lenght 4)
- Two whitelines between blocks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 09:09:29 +00:00
Axel Dörfler
2aacca4469 Brought the document up to date; triggered by an update to this document by
Kamikazow which can be seen as an attachment to bug #1356.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-06 00:03:49 +00:00
Axel Dörfler
f58cf973ad mmlr+bonefish(+axeld - I put the bug in there ;-)):
* Inode::MayReleaseWriter() would release the semaphore too often; therefore,
  Inode::WriteDataToBuffer() now loops in case it still couldn't write anything
  instead of failing - this fixes a race condition (ie. a device is full message).
* In case the read request got filled two times (while adding the request, and
  after waiting for it to become filled), ReadRequest::PutBuffer() overwrote the
  output data. This fixes bug #1331.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 23:38:31 +00:00
Marcus Overhagen
d1dc70fa5f FD_CLOEXEC is a flag, other bits may be set
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 13:56:01 +00:00
Marcus Overhagen
43fdea7d52 writev test application. I expected this to crash haiku, but it hasn't
so far.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 13:24:52 +00:00
Ingo Weinhold
90aa265896 Made the compatibility level for target libbe_test depend on the compatibility
of the host platform. The libtracker Jamfile seems to be the only one that
needs another exception.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-05 01:13:27 +00:00
Michael Pfeiffer
1384a3a81f Make C compiler happy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 17:09:46 +00:00