Commit Graph

4642 Commits

Author SHA1 Message Date
Jérôme Duval d2184e65c1 * whitespace cleanup
* implemented the disabled look and color ramping


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 19:08:26 +00:00
Axel Dörfler 5b812019b4 * Added function block_cache_discard() that flushes blocks from the block cache,
discarding their changes. This functionality currently only works correctly
  when no transactions are used.
* Started test application for the block cache, doesn't do anything yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 14:49:33 +00:00
Ingo Weinhold 10b4b5d175 * Added an "add-on" interface for the runtime loader. Pre-loaded images
can export a structure containing callback hooks invoked by the
  runtime loader when certain image events occur (image loaded,
  relocated, initialized, etc.).
* Also added a mechanism to patch image symbols. For an image callback
  functions can be installed that patch symbols exported or imported by
  the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-03 13:27:14 +00:00
Ingo Weinhold 56eb43e3ca * Made kernel_cpp.h usable in the runtime loader.
* Added new(mynothrow) operators which avoid clashes when also linking
  against libgcc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-03 13:15:12 +00:00
Jérôme Duval 13cb35848b takes into account the column title width
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-02 12:33:32 +00:00
Ingo Weinhold 19d40f9eb7 Moved the rld_export structure from <user_runtime.h> to
<runtime_loader.h>, since it isn't a kernel <-> userland interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-02 03:43:01 +00:00
Ingo Weinhold ca618b2259 * Changed the way symbols are resolved. For each root image (program,
add-on) we create a breadth-first sorted image list and use that to
  search for symbols.
* Added support for preloading libraries. The environment variable
  LD_PRELOAD can contain a whitespace-separated list of shared objects
  that will be loaded before the program. This allows to replace
  symbols without changing the executable or libraries.
* Resolved TODO in load_program() regarding the order of remapping the
  images and initializing the dependencies (problem fixed in r28453).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-02 03:16:30 +00:00
François Revol 9da2356857 Work in progress to pass the image extents to the kernel,
- code is disabled yet as the bootloader doesn't have add_boot_item.. will need to pass via kernel args
- add a GetFileMap() method to the vfs, and implement it in FAT code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 20:39:14 +00:00
François Revol ebb7d4466e add header & (c)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 20:33:39 +00:00
Stephan Aßmus 6849a22864 Patch by Clemens Zeilder:
* Implemented Synaptics touchpad support in the PS2 bus_manager by
  refactoring/splitting the structure some and adding touchpad device
  handling.
* Implemented Touchpad input_server device add-on
* Created Touchpad preflet for configuring advances Synaptics touchpad
  options like scroll region (both horizontal and vertical) as well
  as other neat stuff

Thanks a lot, Clemens!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 10:48:35 +00:00
David McPaul daa2f87441 correct spelling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 22:33:06 +00:00
Ingo Weinhold 3a39905b59 Implemented __freading(), __fpurge(), and fpurge().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 13:02:40 +00:00
Axel Dörfler b4c8ccc372 * The boot loader now creates a CRTCInfoBlock structure when detailed EDID
mode informations are available.
* This is passed to the graphics card when the mode is set in the hopes that it
  will be more conforming.
* Not yet tested on real hardware, though, therefore the VESA driver doesn't
  do anything like this yet. I will test next, but please report any problems
  with this nonetheless.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 09:52:57 +00:00
Jérôme Duval 2c558054fe supports double clicking column title separator to preferred column size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-29 22:50:52 +00:00
Ingo Weinhold a9d23be2f3 Don't define "protected" macro in C++ mode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-29 00:48:57 +00:00
Jérôme Duval 58b80f0913 updated libpng to 1.2.32
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 19:35:14 +00:00
Axel Dörfler 6e036f0479 * Updated glob.h and its implementation to FreeBSD current (1.10, 1.27),
adapted them to work on Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 14:13:30 +00:00
Axel Dörfler a58e2ed8f8 * Added functions FindPartitionByVolume() and FindPartitionByMountPoint()
that conveniently bridge BVolumes/mount points with BPartitions.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 15:33:37 +00:00
Axel Dörfler d5b30a2548 * As Marcus correctly pointed out indirectly, the bitmask for
ide_mask_sector_count_48, and ide_mask_LBA_*_48 were all wrong.
* Using the high byte in LBA48 mode should work now, too (wasn't written
  to the IDE controller before, but that shouldn't have been a problem yet with
  today's disks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 22:14:20 +00:00
Axel Dörfler e2040be893 * Applied patch by Romain Picard: added support for the GNU extension dladdr(),
thanks!
* This closes ticket #2818.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 09:53:48 +00:00
Ingo Weinhold bc3955fea5 Preparations for removing __BEOS__ from the compiler defines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 21:46:26 +00:00
Stefano Ceccherini 4cc3ec9fdd Moved _joystick_info definition to JoystickTweaker.h, since there is no point to keep it public. Removed default parameter in the second version of Open(), otherwise the two functions can't be used unambiguously. Should fix bug #2904
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 08:18:48 +00:00
Jérôme Duval d5de4fbb6c helper functions to get device and vendor names from usbdevs list
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 22:32:37 +00:00
Ingo Weinhold 9a42ad7a77 When switching to a kernel thread we no longer set the page directory.
This is not necessary, since userland teams' page directories also
contain the kernel mappings, and avoids unnecessary TLB flushes. To make
that possible the vm_translation_map_arch_info objects are reference
counted now.

This optimization reduces the kernel time of the Haiku build on my
machine with SMP disabled a few percent, but interestingly the total
time decreases only marginally. Haven't tested with SMP yet, but for
full impact CPU affinity would be needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 15:12:32 +00:00
Ingo Weinhold 412319e8eb * Use a singly linked list for the deferred free entries.
* Added deferred_delete() that takes a DeferredDeletable and deletes it
  asynchronously.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 14:46:20 +00:00
Ingo Weinhold 63a9f18f31 Added MoveFrom().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 14:43:46 +00:00
Axel Dörfler 89b1afd16c * Added a new window feel kPasswordWindowFeel that is above all other feels.
* Changed the password window to use this feel.
* Later, the screen saver itself should use this feel whenever the password
  mode is enabled. The password window should then use a modal-app feel, but
  this doesn't work yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 11:51:23 +00:00
François Revol d4dcbf95f6 - Fix build.
- make system_time() return something sensible until platform code works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 21:23:55 +00:00
Karsten Heimrich 9a321797d9 * fix wrong cast
* fix r5 target build



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 20:21:16 +00:00
Ingo Weinhold 53892c92a0 * Replaced scheduler_remove_from_run_queue() by
scheduler_set_thread_priority(). Setting the thread priority was the
  only situation in which it was used.
* Renamed scheduler.cpp to scheduler_simple.cpp.
* The scheduler functions are no longer called directly. Instead there's
  an operation vector now, which is initialized at kernel init time.
  This allows for picking the most suitable scheduler for the machine
  (e.g. a non-SMP scheduler on a non-SMP machine).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 12:37:13 +00:00
Axel Dörfler 9e163a7a93 * Made BScrollView work when using it with the layout system.
* Added a layout friendly constructor - it's not so nice to use, though, since
  the original one already doesn't get a BRect (we just don't need the
  resizing mode, and have to set the B_SUPPORTS_LAYOUT flag).
* Refactored size/frame computation a bit.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 10:14:24 +00:00
Ingo Weinhold 59dbd26f5f * Moved more debug macros to kernel_debug_config.h.
* Turned the checks for all those macros to "#if"s instead of "#ifdef"s.
* Introduced macro KDEBUG_LEVEL which serves as a master setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-20 14:24:46 +00:00
Ingo Weinhold 1894a0a98b Consistently use KDEBUG. It is always defined and therefore must be
checked with "#if".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-20 13:06:04 +00:00
Ingo Weinhold 47c40a10a1 * Prefixed memset_physical() and memcpy_to_physical() with "vm_",
added vm_memcpy_from_physical() and vm_memcpy_physical_page(), and
  added respective functions to the vm_translation_map operations. The
  architecture specific implementation can now decide how to implement
  them most efficiently. Added generic implementations that can be used,
  though.
* Changed vm_{get,put}_physical_page(). The former no longer accepts
  flags (the only flag PHYSICAL_PAGE_DONT_WAIT wasn't needed anymore).
  Instead it returns an implementation-specific handle that has to be
  passed to the latter. Added vm_{get,put}_physical_page_current_cpu()
  and *_debug() variants, that work only for the current CPU,
  respectively when in the kernel debugger. Also adjusted the
  vm_translation_map operations accordingly.
* Made consequent use of the physical memory operations in the source
  tree.
* Also adjusted the m68k and ppc implementations with respect to the
  vm_translation_map operation changes, but they are probably broken,
  nevertheless.
* For x86 the generic physical page mapper isn't used anymore. It is
  suboptimal in any case. For systems with small memory it is too much
  overhead, since one can just map the complete physical memory (that's
  not done yet, though). For systems with large memory it counteracts
  the VM strategy to reuse the least recently used pages. Since those
  pages will most likely not be mapped by the page mapper anymore, it
  will keep remapping chunks. This was also the reason why building
  Haiku in Haiku was significantly faster with only 256 MB RAM (since
  that much could be kept mapped all the time).
  Now we're using a different strategy: We have small pools of virtual
  page slots per CPU that are used for the physical page operations
  (memset_physical(), memcpy_*_physical()) with CPU-pinned thread.
  Furthermore we have four slots per translation map, which are used to
  map page tables.

These changes speed up the Haiku image build in Haiku significantly. On
my Core2 Duo 2.2 GHz 2 GB machine about 40% to 20 min 40 s (KDEBUG
disabled, block cache debug disabled). Still more than factor 3 slower
than FreeBSD and Linux, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-20 00:06:09 +00:00
Axel Dörfler 23debb05d0 * Rewrote InputServerDevice.h header.
* Renamed _BDeviceAddOn_ to DeviceAddOn, and put it into the BPrivate namespace.
* Moved the DeviceManager functionality into the AddOnManager - this also
  solves a locking issue, as BInputServerDevice::Control() was called in the
  context of the DeviceManager before.
* The AddOnManager now uses the BPathMonitor to monitor the devices that
  BInputServerDevices ask for - this greatly simplifies the code.
* Got rid of TList.h, and use ObjectList.h instead.
* Added PathList class that has a list of paths with reference count, used by
  DeviceAddOn and the AddOnManager.
* DeviceAddOn got an actual implementation that lives in InputServerDevice.cpp.
* Added an experimental BInputServerDevice::AddDevices() that could be used
  instead of recursing over devices manually. It replaces the functionality
  that was found in the DeviceManager before (this was done implicitely for
  all monitored devices).
* Greatly cleaned up and simplified the AddOnManager.
* Also fixed lots of potential errors/leaks when things go wrong.
* Removed the extra locker in AddOnManager - its BLooper lock is now used
  instead.
* Replaced PRINT()/PRINTERR() macros in the AddOnManager with TRACE(), and
  ERROR(), both now use debug_printf().
* Hopefully this fixes the problem that I don't have keyboard under VirtualBox
  from time to time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 15:48:34 +00:00
Axel Dörfler ab42853558 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 13:17:29 +00:00
Karsten Heimrich d751323939 * reintroduce member fOffscreen which got removed in r2917
* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)

  fixes ticket 1522, 1591, 1946, 2318 and propably more

  While creating an BBitmap in BApplication the bitmaps window looper would
  be added to the applications gLooperList, thus calling Quit() on that window
  and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
  would fix the problem, but tests on R5 have shown that BApplication hides the
  offscreen window in CountWindows() and WindowAt().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:23:18 +00:00
Karsten Heimrich a02979bb3f * cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:05:37 +00:00
Rene Gollent ca5e024130 Probably forgotten changes in the last commit, though I'm not sure if Axel had any other style cleanups in mind in this file. Fixes build at any rate.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 15:45:57 +00:00
Ingo Weinhold 7ab39de989 * Removed unused SMP_MSG_RESCHEDULE ICI message.
* Introduced flag "invoke_scheduler" in the per CPU structure. It is
  evaluated in hardware_interrupt() (x86 only ATM).
* Introduced SMP_MSG_RESCHEDULE_IF_IDLE message, which enters the
  scheduler when the CPU currently runs an idle thread.
* Don't do dprintf() "CPU x halted!" when handling a SMP_MSG_CPU_HALT
  ICI message. It uses nested spinlocks and could thus potentially
  deadlock itself (acquire_spinlock() processes ICI messages, so it
  could already hold one of the locks). This is a pretty likely scenario
  on machines with more than two CPUs, but is also possible when the
  panic()ing thread holds the threads spinlock. Probably fixes #2572.
* Reworked the way the kernel debugger is entered and added a "cpu"
  command that allows switching the CPU once in KDL. It is thus possible
  to get a stack trace of the thread not on the panic()ing CPU.
* When a thread is added to the run queue, we do now check, if another
  CPU is idle and ask it to reschedule, if it is. Before this change, the
  CPU was continuing to idle until the quantum of the idle thread
  expired. Speeds up the libbe.so build about 8% on my machine (haven't
  tested the full Haiku image build yet).
* When spinlock debugging is enabled (DEBUG_SPINLOCKS) we also record
  the spinlock acquirer on non-smp machines. Added "spinlock" debugger
  command to get the info.
* Added debugger commands "ici" and "ici_message", printing info on
  pending ICI message respectively on a given one.
* Process not only a single ICI message in acquire_spinlock() and other
  places, but all pending ones.
* Also process ICI messages when waiting for a free one -- avoids a
  potential deadlock.
* Mask out non-existing CPUs in send_multicast_ici(). panic() instead of
  just returning when there's no target CPU left.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 18:14:08 +00:00
Ingo Weinhold 78c90d44ca Moved definition of the PAUSE macro to <cpu.h>, respectively
<arch/cpu.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 16:53:31 +00:00
Ingo Weinhold 901f1930e1 * Moved memset_physical() to vm.cpp and made it available in the kernel.
* Added memcpy_to_physical().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 16:32:12 +00:00
Michael Lotz f7de7fa4e3 Add throw() to the nogrow new operator. This will cause the right version to be
used that handles NULL returns and doesn't expect an exception. This fixes that
certain constructors would still be called even if the allocation failed in low
memory situations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 08:32:42 +00:00
Ingo Weinhold 6e595b29e3 Moved KERNEL_BREAKPOINTS to kernel_debug_config.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:43:32 +00:00
Ingo Weinhold 3b248948f2 Added ThreadCPUPinner AutoLocker class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:41:11 +00:00
Michael Lotz 88db388930 Remove one line of whitespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:22:00 +00:00
Michael Lotz 3c6372b44a Rename BMessage::CompareData() to HasSameData() as this makes more sense for the
bool return type. Did I mention this was an unstable Haiku extension?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:45:12 +00:00
Stephan Aßmus 11c5023a77 Applied patch by Stephen Deken:
* Added a new class BAffineTransform, currently in the BPrivate namespace
  and the inofficial "shared kit".
* Extended BPolygon to be transformable by a BAffineTransform.

Thanks a lot!

Minor fixes by myself:
* The class accidentally still derived from agg::trans_affine.
* Added then missing comparator operators.
* Swapped the BPoint* and count arguments of Apply(), since that seems
  to be the more common order in the other Be API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:10:10 +00:00
Michael Lotz 5b25b917f9 Introduce BMessage::CompareData() which is a Haiku API extension. It compares
the data of two BMessages and allows recursive comparison (BMessage inside
BMessage). Note that using this API might require you to recompile your app in
the path to R1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 15:55:36 +00:00
François Revol 2cf4975b4b Add FAT32 support. This allows the bootloader to find a BFS image file (currently named BEOS\IMAGE.BE) and start booting for it, until the kernel tries to mount the boot partition.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 23:54:04 +00:00