Commit Graph

25906 Commits

Author SHA1 Message Date
David McPaul
84b6bd9a95 Correct display of Duration
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 23:09:14 +00:00
Ingo Weinhold
4431edd453 Patch by Zhao Shuai with minor changes by myself:
* Moved the static functions to the beginning of the file.
* Renamed several variables for more clarity, particularly
  offset/cacheOffset to index/pageIndex in case where the unit is pages.
* _SwapBlock{Build,Free}() can deal with a range of pages now, which
  should be more efficient.
* Additional checks/panics in swap_page_alloc().
* swap_file_add(): Wrong byte count was used when allocating and
  clearing the bitmap.
* swap_page_alloc(): Fixed off-by-one check. The last page of the swap
  file could not be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 20:46:12 +00:00
Bruno G. Albuquerque
c4cbe945fe - Exported CDDB id trough the CD:cddbid attribute.
- Tracks are now called "Track XX" instead of "XX".
- We need no stinking TLAs! :)

Next step, porting CDDBLinkD to Haiku.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 17:39:33 +00:00
Axel Dörfler
70e2d4ac43 * Replaced the B_BLOCK_DEVICE_* defines with B_DMA_* defines that better match
our dma_restrictions structure (but we're using blocks instead of bytes,
  since unlike the block size, the restrictions attributes are constant).
* We might want to use blocks for the dma_restrictions structure as well in
  the future...
* Fixed another bug in the device_node variant of DMAResource::Init(): the max
  segment size was specified in blocks as well.
* Removed the "hardcode" block_io module and header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 15:08:16 +00:00
Axel Dörfler
61b1a536e8 * Fixed the mix of bufferCount vs. max_segment_count with regards to
B_BLOCK_DEVICE_MAX_SG_BLOCKS as pointed out by Ingo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 14:28:20 +00:00
Axel Dörfler
ad12e71861 * If USE_SSL is set when compiling the MDR add-ons, SSL will be used.
* By default, it will use a directory generated/cross-ssl where you need to
  unzip the optional openssl package into before. If you're on Haiku, you can
  use the SSL_DIR environment variable to point it to /boot/home/config
  instead.
* Fixed build with USE_SSL defined.
* Renamed USESSL to USE_SSL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 12:28:44 +00:00
François Revol
6a5919034d This makes the FileMapDisk code work. zbeos can now locate an haiku.image embedded within another one as BEOS/IMAGE.BE (that's just for testing, it will be used with FAT or ISO9660 later on). It starts to boot the kernel but crashes later, it will need an fmap driver anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 02:10:31 +00:00
Ingo Weinhold
4141741265 * Added new(vip_io_alloc) operators allocating memory from the VIP I/O
heap.
* Allocate IOBuffers, IORequests, and cookies on the VIP I/O heap, if
  necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 01:38:08 +00:00
Ingo Weinhold
749facf1eb Extended the "heap" debugger command to allow specifying the address of
the heap to print infos about.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 01:35:31 +00:00
François Revol
52ba991910 Patch by Duane on IRC, makes it build again (but won't work). Needs investigation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 00:48:21 +00:00
Ingo Weinhold
d88a145e9e Added an allocator providing memory associated with VIP (i.e. page
writer) I/O requests. Not used yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 00:44:05 +00:00
Ingo Weinhold
f3e82cfe42 * Instead of a heap class index heap_create_allocator() gets an actual
heap_class object now. Removed unused heap_allocator::heap_class.
* Made heap_class, heap_create_allocator(), heap_memalign(), heap_free()
  public, so that a specialized allocator can be used elsewhere in the
  kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 00:40:40 +00:00
Axel Dörfler
38d78c5f83 * The Development package will now also add the _KERNEL_ lib (which is the file
kernel.so, not a link to the actual kernel as on BeOS).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 23:38:39 +00:00
Axel Dörfler
6776de960b * Made the relocation more robust against incorrectly built images.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 23:20:18 +00:00
Axel Dörfler
345d8c9ff0 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 12:59:18 +00:00
Axel Dörfler
f1efe9b3d2 * The string length of the UTF8 ellipsis was incorrect (would have been 3).
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 12:53:25 +00:00
Axel Dörfler
55585cfa0d * truncate_middle() could eat the whole string if it was as large as the
ellipsis. This was visible in missing window titles for short names like
  "bin".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 12:52:14 +00:00
Axel Dörfler
80fb0607c5 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 12:50:53 +00:00
Axel Dörfler
7f57b05f1d * Temporarily use the private I/O request API to decide whether or not the
request is a write request.
* This closes bug #2579, thanks BGA for the investigation!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 11:04:51 +00:00
Axel Dörfler
d689f4578d * Fixed a possible deadlock in Desktop::_ActivateApp(): since ActivateWindow()
will need to write lock the window lock, we cannot call it with the read
  lock held.
* Added a TODO comment in _ActivateApp() on how we could handle minimized
  windows.
* Added a WindowList::Count() method.
* Added a WindowList::ValidateWindow() that you can use to validate a window
  pointer in case you had to unlock the list.
* Made FirstWindow()/LastWindow() const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 09:00:36 +00:00
Ingo Weinhold
c91868ae1d * Introduced common base class SchedulerTraceEntry for the scheduler
tracing entry classes.
* Added new "scheduler" command, available when scheduler tracing is
  enabled. It analyzes the tracing entries for a given thread and prints
  scheduling statistics for that thread. Should hopefully help to
  understand the poor scheduling latencies in certain cases.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 21:23:16 +00:00
Ingo Weinhold
ef7102fa29 * Made TraceEntryIterator available in the kernel.
* Fixed TraceEntryIterator::Current(): If fEntry was NULL, it would
  return 0x4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 21:16:15 +00:00
Axel Dörfler
b31df46fd2 * The window title now uses B_TRUNCATE_MIDDLE instead of *_END.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 21:07:28 +00:00
Jérôme Duval
1fb04337f5 * added pin capabilities and power support constants
* added a record stream, assigned it to input widgets: no recorded sound yet, though buffer cycling is ok


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 21:06:48 +00:00
Axel Dörfler
b8beeb35ea * The Switcher now uses the new application/window order functions to sort
the application/window lists before using them.
* This means that you can now switch just between the two topmost apps when
  pressing Control-Tab. If you press it fast enough, it will fall back to the
  old method of iterating through all apps.
* Only define the private BeOS window management API for BeOS itself, for
  Haiku, better use the private WindowInfo.h header.
* Changed BeOS's window_info structure to match how Haiku does it (improved
  naming, separation between client_window_info and window_info).
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 17:50:21 +00:00
Axel Dörfler
ae0606be74 * Added two more private InterfaceDefs functions: get_application_order(), and
get_window_order() will retrieve the application respectively window order
  on the selected workspace.
* Moved private BeOS compatible functions (as used by the Deskbar) into the
  private WindowInfo.h header.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 17:39:42 +00:00
Axel Dörfler
a8f4e1d0fd * _ActivateApp() did not lock the window list while traversing it.
* It will now first iterate through the windows on the current workspace to
  choose the topmost window of this team (for this, it would be nice to have
  a sorted list over all windows/workspaces).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 17:33:32 +00:00
Ingo Weinhold
46ec230162 When in the kernel debugger we do now record the relevant information
(fault address, pc, read/write) when a page fault occurs, and print them
in case this caused the termination of a debugger command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 17:09:42 +00:00
Ingo Weinhold
3b99126c1e Fixed table columns alignment in the "threads" command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 17:03:43 +00:00
François Revol
cc66988f36 Bump default image size to 128MB
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 15:45:42 +00:00
Stephan Aßmus
3f953c833c Added clarifying comment for something that puzzled me at first.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 15:15:02 +00:00
Stephan Aßmus
8a0be4edeb * I misunderstood the previous of adding fPath.Path() to the message. It was
meant to be able to tell which monitor the message came from. So I added it
  back in. Since I used "path" already for the entry, I renamed the field to
  "watched_path". No code was using it yet, so this should be ok and the
  purpose more clear anyways.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 14:49:30 +00:00
Stephan Aßmus
2bf5ba0562 Minor style cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 14:43:46 +00:00
Stephan Aßmus
edc51252d3 * A few versions of BMessage::AddXXX and ReplaceXXX did not check the argument
passed to the function against NULL.
* Made BMessage::AddFlat() use an optionally heap allocated buffer versus always
  a stack allocated one.
* Small simplification in BMessage::AddMessage(), we can simply compare the
  buffer with the stack based buffer to know whether we need to free() it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 14:38:31 +00:00
Axel Dörfler
44cd4a02c7 * Deskbar's Switcher had an explanation what the window_info::layer field is
about. ServerWindow::GetInfo() now fills in that value following this logic
  as well as further testing.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 13:44:17 +00:00
Axel Dörfler
0eb592d7fe * Fixed off by one error in the number of clicks to finish the game (it can
hardly be odd).
* Fixed spelling error Genarate -> Generate.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 13:03:36 +00:00
Rene Gollent
fb6d782320 Fix some style issues pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 12:41:10 +00:00
Ingo Weinhold
dce8d473d5 When freeing the swap space associated with a page, the page must be
marked modified again, so that we don't lose its data when someone
decides to steal it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 00:08:33 +00:00
Ingo Weinhold
95accc28f8 Patch by Zhao Shuai with small changes by myself: The page daemon does
now also free swap space assigned to pages that are rather active.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 23:55:30 +00:00
Rene Gollent
3734bee77d When the boot loader goes to load its settings files, it will now also prepend the "kernel" settings file to the safe mode settings if it exists. This allows settings from kernel/drivers/kernel to be respected early in the boot process as well, which allows us to do things like disable_smp permanently instead of having to pick from the safe mode menu every single boot. Review welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 23:03:36 +00:00
Stephan Aßmus
afbd081a6f * TRACE macro no longer needs double parenthesis.
* The global BPathMonitor looper is now always used, no more optional looper
  and no more BApplication looper usage. This way we know how the looper behaves
  and PathHandler::Quit() can be synchronous. In the end, the bug I was
  observing was not caused by the previous asynchronous node monitor stopping,
  but this should be safer anyways. When BPathMonitor::StopWatching() returns,
  you have really stopped watching and not some time later.
* Introduced "FileEntry" which is an entry_ref plus node id. This is now used
  instead of the node_ref for the "watched files set". The whole point
  is to really be able to add the "path" field to the B_PATH_MONITOR message.
  Previously, the initial path that was passed to StartWatching() was added,
  regardless if the message was for an entry somewhere down the hierarchy when
  watching recursively. The downside of the new method is that it uses a lot
  more RAM per entry. Another option would be to store the node id of the parent
  directory and iterate the directory always when in need to construct the path.
* Watching a folder recursively now really adds all the existing subfolders
  as well as all the files if not watching for folders only. The tests for the
  old implementation only tested what happens when the watched folder was newly
  created and then subfolders were created. Those where already added by the
  code. Now it also adds the subfolders of folder that appear in a watched
  folder.
TODO: Remove folders and files recursively when they dissappear. More testing
for B_ENTRY_MOVED. Optimizations are possible when some information is
retrieved twice. I am also planning to add a way for the BPathMonitor user to
filter the automatically watched files/folders in B_WATCH_RECURSIVELY mode.

I grepped the entire Haiku tree for usage of BPathMonitor. Only net_server
and Mail were using it, but both in a way that is not affected by these
changes. Anyways, TextSearch works more reliable now, even for entries in
subfolders.

Feedback very welcome! :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 20:02:59 +00:00
Stephan Aßmus
545bce00c6 * Added more tracing facilities (Function enter/exit printer)
* Decreased the node monitor activity timeout to 150 ms
* _StartNodeMonitoring() simply starts watching the root folder with the
  B_WATCH_RECURSIVELY flag set. (Requires forthcomming changes to
  BPathMonitor, but it was broken anyways.)
* _StopNodeMonitoring() returns early if node monitoring is inactive.
* When node monitoring is started after a search finished, it is done
  asynchronous, since messing with the other controls results in modification
  messages that otherwise stop node monitoring again. Now the message is
  inserted last and works reliably.
* When receiving B_PATH_MONITOR messages, they are supposed to simply contain
  a "path" field with the full path to the node that changed. That's not
  currently the case with BPathMonitor, but I will commit that stuff next.
  (Was broken before anyways.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 19:08:12 +00:00
Stephan Aßmus
b815b7edc6 * Added convenience methods for debugging.
* Added better tracing support.
* GetNextName() was not incrementing the index when iterating to the next entry
  and was therefor broken if the object managed more than one entry.
* Made a small simplification in EntryRemoved().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 19:00:35 +00:00
Stephan Aßmus
0f5788e861 It's important to add the ref ot the message also when we are reporting a
negative.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 18:57:09 +00:00
Axel Dörfler
872c3d3f6a * Fixed the broken nodeFlags semantics in BDirectory::Contains() (they are
flags, after all).
* This fixes the "Command-Tab" ie. switch to source/header command in Pe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 18:16:33 +00:00
Axel Dörfler
8f38768e65 * Don't define DEBUG in public headers!!! Doing it this way will break the
build for others, namely those that also include <Debug.h>
* This fixes the remaining problems of building Pe under Haiku.
* Those files need a giant style cleanup... Fredrik, time to have a look at
  our style guide :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 16:45:26 +00:00
Stephan Aßmus
45d431a676 Applied patch by Andreas Faerber:
Consequently use the IANA "x-" prefix for unofficial MIME types.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 11:15:28 +00:00
Axel Dörfler
3d3fe5a58c * Added tracing support to our scheduler to be able to do better diagnosis
with scheduling problems.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 10:20:16 +00:00
Stephan Aßmus
4c660d948d Applied patch by scottmc to fix the placement of some out of order names.
Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 09:05:36 +00:00
Ingo Weinhold
5409ef46f6 Squashed TODO: Clone the image list on fork().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 00:30:00 +00:00