Commit Graph

26029 Commits

Author SHA1 Message Date
Ingo Weinhold ce2a6a4bed Don't release the semaphore, if no one is waiting on the condition
variable. pthread_cond_broadcast() incorrectly returned an error
when no one was waiting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 13:41:52 +00:00
Ingo Weinhold fbed358934 The incorrect indentation fooled me. <stropts.h> is already included in
Linux.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 12:35:12 +00:00
Ingo Weinhold 3d62be2e79 Not so in BeOS/Haiku, but officially ioctl() is defined in <stropts.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 12:30:23 +00:00
Salvatore Benedetto 29fd670a1b * Updated license
* Removed extraneous tabs
* Implemented lldiv (#2688)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 10:40:58 +00:00
Ingo Weinhold e969748a3d Added test program "time_stats" which is a "time" on steroids. It prints
not only the times for the child process, but also for all other
threads. Gives some more insight into what was going on in the system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 03:04:28 +00:00
Ingo Weinhold 841b6cd749 * Also add the creating thread to an IORequest and let child requests
inherit it.
* IOScheduler::ScheduleRequest() uses the request's thread and team now
  instead of the current one. Otherwise for requests processed
  iteratively this would always be the I/O scheduler's notifier thread.
* Also get the thread's I/O priority now. It's still ignored later,
  though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 00:43:46 +00:00
Ingo Weinhold 3b3e3805f8 Added thread::io_priority field and functions to get/set it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 00:37:02 +00:00
Ingo Weinhold 4612433715 * Added parameter "size_t align" to file_map_translate(). If > 1, the
vector at the end of the file will be aligned to the given value.
* BFS uses an alignment of 512 bytes (should be block size of the
  underlying device or BFS block size, whatever is less), which should
  be fine, since file data are only stored in BFS blocks. This totally
  avoids any partial operations at the I/O scheduler level, thus saving
  disk operations. Not that I could measure any performance difference.
  Theoretically it should help a lot though, particularly when dealing
  with lots of small files, since we avoid using bounce buffers, which
  are (a) limited in number and (b) require copying of the data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 23:06:28 +00:00
Ingo Weinhold fd49e6b35a Print some more interesting timing info for the page writer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 22:50:44 +00:00
Michael Pfeiffer 4352fc9187 Bug fix: The calculated day of week is based on a week that starts on Sunday, in a calendar with Monday as week start this number has to be adjusted in case of a Sunday. It would be 0 but should be 7.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 18:15:44 +00:00
Michael Pfeiffer f0932941dd Simplified initialization of week days for a month.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 16:13:05 +00:00
Karsten Heimrich c984125a2d * not zoomable, minimizable
no hide shortcut, this will hide deskbar too



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 14:25:12 +00:00
Karsten Heimrich 35c6651cfd * remove HIDE_ APPLICATION shortcut, feel free to revert if this is wanted
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 14:24:03 +00:00
Karsten Heimrich ee24e75d62 * man, i managed to mess up an one liner...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 13:06:52 +00:00
Karsten Heimrich b1287e5da5 * the condition should not have change, thanks Stephan for pointing this out :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 13:03:58 +00:00
Karsten Heimrich c1ed5d75d7 * special case only the end of the year
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 22:53:15 +00:00
Karsten Heimrich b5e8c1341a * hrmm, March 2009 was week 0 ...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 19:46:02 +00:00
Karsten Heimrich 3f9abddf33 * Reuse calendar from shared to have a bitmore advanced panel
while holding down the mouse over the date area in Deskbar.

  One probably needs to clean and rebuild Deskbar to get it...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 19:31:13 +00:00
Karsten Heimrich 78092ae789 * move DateTime and CalendarView into shared
* adjust Time preflet to take that into account



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 19:26:58 +00:00
Ingo Weinhold 1d059a02b9 Enabled swap file support by default. I successfully built Haiku with
256 MB RAM, 1.5 GB swap, and "jam -j2", so it basically seems to do its
job alright.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 13:48:55 +00:00
Ingo Weinhold aa868cf6c1 Adding/removing swap files:
* swap_file_add() open()s the swap file now with O_NOCACHE and
  swap_file_delete() closes it. This squashes a TODO (the file cache
  wasn't kept disabled for the swap file before).
* swap_file_add() only adds swap files that can actually be used (i.e.
  non 0-sized ones).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 13:45:08 +00:00
Michael Pfeiffer 3a2ac557f2 Added Mathew Hounsell to list of contributors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 05:40:00 +00:00
Ingo Weinhold d277d9f2f8 Don't always commit memory in VMAnonymousCache::Fault() for
overcommitting caches. If the page in question was just not mapped or
swapped out, we would increase the committment unnecessarily
(potentially even beyond the size of the cache).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 00:49:09 +00:00
Ingo Weinhold ae21ddaf58 steal_pages() was leaking a cache reference since r26572, i.e caches
locked there would be leaked eventually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 00:44:12 +00:00
Karsten Heimrich 70bf426b8c * gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 19:32:18 +00:00
Karsten Heimrich 1678a1dd2c * if the given buffer size is to big, we will know we handle it in Attach
this should fix LinkSender usage like as in Stroke/ FillPolygon in BView



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 18:43:33 +00:00
Karsten Heimrich 10c45684ea * remove messenger leak in save panel
* tell something if saving a file fails before it gets to TranslationUtils, fixes #2612



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 18:02:53 +00:00
Bruno G. Albuquerque 837057611d - Better be safe than sorry. Check MIME type and super type after
constructiuon. Thanks Rene for reminding me that BMimeType actually has a
  InitCheck() method. :)




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 17:38:52 +00:00
Stephan Aßmus ec56835f51 Patch by David Powell:
* Implement color palette generation for the boot splash images in the
  generate_boot_screen build tool. Only 4-bit screen support is missing now.
* Adopted images.h with the new results from generate_boot_screen.

This should fix black boot screens for graphics cards that don't support
true color modes for the native resolution. I've tried to find the ticket,
#2177 almost looks like the one, but it looks more like the mode is out
of range if I understand the ticket right.

Thanks a lot, David, and sorry it took so very long to apply your patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 16:59:34 +00:00
Stephan Aßmus e2bc27448f Could have been part of r27221. Added BColorQuantizer to libshared.so. Should
be useful for the GIF Translator for example, maybe even for PNG.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 16:38:27 +00:00
Stephan Aßmus 740fe892ac Added a BColorQuantizer class to the "shared kit" based on a patch by David
Powel. The functionality was written by Jeff Prosise and Davide Pizzolato and
has been cleaned up and adopted to the Haiku coding style by David Powell and
myself. The class can perform a color quantization for generating the optimal
color index palette (with given maximum size) from a given RGBA image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 16:33:12 +00:00
Stefano Ceccherini 910c4a0106 the Link* api supports sending large messages through areas, thanks to Julun, and this TODO can be removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 15:32:26 +00:00
Stephan Aßmus 3f2dd98c88 This fixes a bad feeling in my stomache:
* When mounting a non-BFS volume, suggest to the user to mount it read-only.
* Store the mount flags with each volume in the automounter settings, restore
  mount settings on next boot.
The second part is probably nice to have anyways und should prevent bad surprises,
the first part should be removed again when we have absolute confidence in all
our file system implementations as well as the kernel itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 13:26:45 +00:00
Karsten Heimrich 3bc4dacf9a * We need to update the drawing state in case SetHighColor, SetDrawingMode etc.
is called after BeginPicture on a freshly created view.

  This is necessary because a second invocation on this view with BeginPicture
  would have caused ServerPicture::SyncState to write the default drawing state
  into the picture. This happens because to BView had now cached the values and
  therefor won't go to the app_server and tell about the change. The first call
  did not change anything as picture recording is handled in _DispatchPictureMessage
  while view changes that modify drawing state are handled in _DispatchViewMessage,
  thus leading to default draw state values beeing written.

  This fixes invalid ticket #2534.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 12:01:46 +00:00
Ingo Weinhold 96b6a162a1 Increased the number of pages the page writer tries to write per run.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 01:49:59 +00:00
Ingo Weinhold 0316483f0a * DMAResource::TranslateNext(): Added parameter to limit the maximum
operation length.
* IORequest: Added owner (IORequestOwner). Also added a SetUnfinished()
  method, which is invoked by the I/O scheduler after all operations of
  the request have been finished, but the request isn't done yet.
* Added debugger commands "io_request_owner" and "io_scheduler" printing
  information for a IORequestOwner and IOScheduler object respectively.
* Implemented an actual I/O scheduling algorithm. It's a simple round
  robin strategy (a queue per thread) with a unidirectional elevator
  serializing the operations. ATM priorities are ignored, the bandwidth
  isn't adjusted to the device, and there are TODOs all over the place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 01:49:18 +00:00
Ingo Weinhold ca2a5874fa Disabled support for nested partition maps for the time being. Since
we're quite lenient parsing the partition descriptors, we recognized
pretty much any partition that by accident has a PTS signature and that
no other disk system supports. Should fix bug #2668.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 22:36:44 +00:00
Karsten Heimrich 4e61552ecd * first implementation of passing data via area to app_server
this makes printing of large images work, fixes task #1067



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 13:39:16 +00:00
Ingo Weinhold 953cb30447 Re-added support for kernel breakpoints. This feature is just way to
handy in certain situations to not have it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 12:52:23 +00:00
Ingo Weinhold 0490454cb8 Made safe to be included from assembly code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 12:50:56 +00:00
Karsten Heimrich 4f3736d7b6 * show the config job panel, even if no page setup was already performed
this avoids to multiple window popup for page settings and job settings

* Note: this shows the painting regression introduced with r26665, see task #2534



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 22:19:00 +00:00
Stephan Aßmus 4ddc254c08 * Implemented decreasing the volume of inactive player windows according to
the global settings. This is only done though if there are multiple players
  open at the time. (It doesn't consider their "playing" state, though.)
* The SettingsWindow is now maintained by the MainApp, and there is only a
  single instance, those settings are application wide. Also used the
  "application floating" window look&feel.
* Small code cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 18:34:36 +00:00
Stephan Aßmus 0cafe2dfb9 * Fixed a race condition in BWindow::Show(). If it was the first time Show()
was called, the calling thread could be preempted, or simply be blocked on
  calling Lock() after running the window thread. The window thread in turn
  could be processing messages. In that case, fShowLevel would still have the
  wrong value. For example, MediaPlayer would call IsHidden() on one of it's
  views, which would then return true for this case. The result was that the
  video view was not hidden and a black rectangle was showing on top of the
  controls. This may also have caused other similar problems of course.
* fRunCalled was accessed without holding the lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 18:30:47 +00:00
Stephan Aßmus 9a5f768b19 * Implemented the "Auto start playback", "Close when done playing movie" and
"Close when done playing sound" settings.
* Removed unused member variables from Controller
* Changed Playlist::SetCurrentRef() to indicate success and prevent the
  current index from getting out of range.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 13:45:55 +00:00
Stefano Ceccherini 139f143c62 fixed warnings. Maybe we should do all the calculations in ints instead of using floats
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 06:59:00 +00:00
Stefano Ceccherini 47abb8bfef partially reverted the latest change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 06:08:24 +00:00
Rene Gollent 21cc1202f3 Fix this bug in the correct spot by forbidding the controller from trying to toggle the playback state if it hasn't been initialized with a file. Thanks for the tip, Stephan!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 02:32:13 +00:00
Karsten Heimrich 6163f3334b * some more cleanup
* pass the target directly to AddItemMenu
* use default paramter to enable the menu item
* fixed messenger leaks for file panel and resizer window messenger
* show the job config panel when the 'Print' menu item is invoked + shortcut 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 00:24:21 +00:00
Ingo Weinhold 9837b719af Some documentation on swap file support by Zhao Shuai.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 22:09:45 +00:00
Ingo Weinhold ddeb7bfaf1 Changes by Zhao Shuai and myself:
* The VMAnonymousCache destructor was unreserving too much physical
  memory.
* Addressed TODO in _SwapBlockBuild(): When the swap block couldn't be
  allocated we wait and loop until it can.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 22:04:17 +00:00