Commit Graph

3171 Commits

Author SHA1 Message Date
Karsten Heimrich 320a952cdd * extend Haiku specific client window info to include the tab height and border size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-27 21:03:32 +00:00
Bruno G. Albuquerque ef93221da6 - Now NetBuffer and DynamicBuffer agree and the smallest buffer size posible.
- This means that buffers with a initial size of 0 work now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-24 23:42:43 +00:00
Michael Lotz fb3e35fcec Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-23 03:05:15 +00:00
Bruno G. Albuquerque a12096e5c7 - Got it to actually compile.
- Default buffer size is now set to 1 instead of 0, which would cause the
  construction without a given size to fail.
- Added copy constructor.
- Changed _GrowToFit() to have a boolean parameter to indicate if we want
  to resize the buffer to an exact size. Used by the copy constructor. 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-17 15:56:40 +00:00
Bruno G. Albuquerque c98ce75f21 - Fixed style violations pointed by stippi.
- Use std:nothrow for new calls.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-17 14:01:22 +00:00
Bruno G. Albuquerque 550d24175f - Simple dynamic buffer class implementation.
- Will be used by the new (R5 compatible) NetBuffer class.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-17 13:30:21 +00:00
Axel Dörfler 40890e97b3 * Committed Clemens Zeidler's Intel speedstep driver. Thanks a lot, Clemens!
This is a very welcome addition.
* There are a few issues, and maybe questionable decisions (like the dependence
  on ACPI), but I see no reason why it shouldn't be added in its current form
  already.
* Unfortunately, I could not test it yet, though, as the CPU of my laptop is
  not supported; will see if I can find a supported hardware, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-14 21:08:37 +00:00
Axel Dörfler d68ffdedc0 * More or less completed the network notification module - it does not remove
old invalid user listeners yet, though (ie. if a team dies).
* Implemented userland network monitor functions.
* Added a few notifications to the network stack, even though this part isn't
  complete yet (especially notify_interface_changed()).
* Added optional debug output to the notifications module.
* Added the module to the image, it basically works now (tested).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-27 20:48:28 +00:00
Jérôme Duval 2bbb828870 added get_modifier_key() as proposed by Olivier Cortes. Thanks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-14 14:43:49 +00:00
Oliver Ruiz Dorantes a2f8edf787 Add HCI command for retieving Local Device Class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-13 23:24:11 +00:00
Rene Gollent eaed962ce9 send_notification needs to return a status_t, otherwise the build breaks in the notifications module.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-10 01:06:50 +00:00
Axel Dörfler e6dd439f7c * Work-in-progress of a network notification implementation.
* Compiles, but doesn't work at all yet. For those who wonder: the networking
  notifications are put into a separate module, so that the network stack can
  be unloaded without losing connection, IOW user applications will continue
  to retrieve notifications when the stack is loaded again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-09 23:16:10 +00:00
Oliver Ruiz Dorantes fbbf64a410 Remove dedicated implementation of GetAddress and GetName in server side.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-08 22:49:20 +00:00
Oliver Ruiz Dorantes b3256174a6 Change module name
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-25 18:22:25 +00:00
Oliver Ruiz Dorantes 25f31b227e - Allow the header being used from C code
- Minor Styling



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-22 10:49:40 +00:00
Oliver Ruiz Dorantes 7a3a199ad5 Add flags to handle the status of the configuration of the channel
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-22 10:30:38 +00:00
Jérôme Duval f12491c7f9 added Headphones and SPDIF string constants
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-17 19:44:36 +00:00
Axel Dörfler 0a3f410f30 * Added a Desktop::BroadcastToAllWindows() method that sends all ServerWindows
a message.
* The DesktopSettings class is now using that to send the new
  AS_SYSTEM_FONT_CHANGED message to all windows.
* The ServerWindow now propagates font changes to its decorator, causing it
  to update its drawing. That means changing the bold font in the "Fonts"
  preferences application will instantly change all window titles.
* Factored out a _RebuildAndRedrawAfterWindowChange() out of several Desktop
  methods, simplifying some code.
* The DefaultDecorator no longer calls _DoLayout() twice (through SetLook()),
  but instead calls the new _UpdateFont() method now also called by
  FontsChanged(), and SetLook().
* BWindow::GetDecoratorSettings() now also includes "tab frame" BRect with the
  exact footprint of the tab, allowing apps to know the size of the tab to
  position itself accordingly.
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 21:59:05 +00:00
Ingo Weinhold 0c85bd054e * Reworked undefined symbol resolution in the runtime loader. Got rid of
the per-root-image breadth-first sorted image array. Instead we have a
  per-image hook function to resolve the symbols. The default function
  uses the sLoadedImages list directly, which is breadth-first sorted
  anyway. There's also a BeOS function for old-style symbol resolution
  and one for add-ons, which lacks a proper implementation yet (just
  uses old-style ATM).
* Made the dl*() functions POSIX compliant:
  - dlopen() does no longer use load_add_on(), but loads the object as a
    library. It also properly supports a NULL name, now -- the previous
    "_APP_" work-around did only work, if this soname was set on the
    program (unlikely for programs using this API).
  - Implemented RTLD_{GLOBAL,LOCAL}.
  - dlsym() looks up symbols properly now, i.e. not just in the given
    image, but breadth-first for an actual image or in load order for
    the global scope. It also supports the not-quite POSIX RTLD_DEFAULT
    and RTLD_NEXT extensions. Our RTLD_NEXT finds more symbols than in
    Linux (also in later dlopen()ed libraries), but that should be fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 22:40:56 +00:00
Ingo Weinhold e10b4cace5 Added __arch_get_caller(). Correctly implemented for x86 only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 22:09:28 +00:00
Stephan Aßmus b545073f08 * Moved the global BPrivate::WidthBuffer from BTextView into BPrivate as
gWidthBuffer.
* Tracker PoseView now uses BPrivate::gWidthBuffer instead of it's own
  instance.
* TextView.h and PoseView.h are now a little cleaner.
* InterfaceDefs.cpp now deletes gWidthBuffer in _fini_interface_kit_().
* Added binary compatibility support for NetPositive in WidthBuffer.h and .cpp.
  Obviously it kind of defeats the purpose of having WidthBuffer neatly tucked
  away in the BPrivate namespace, but Haiku should run NetPositive, I guess.
  Fixes #2879.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-06 11:31:40 +00:00
Jérôme Duval 03d1f00c86 now uses DIRECT_BUFFER_INFO_AREA_SIZE as the direct_buffer_info area size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-05 23:40:29 +00:00
Karsten Heimrich ff693eba44 * fix wrong cast in Minute()
* fix _SetTime(), was using the wrong * operator, resulting in
  an overflow at some point that lead to the mentioned jumping

 fixes 2878 and 3057



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-05 23:23:02 +00:00
Axel Dörfler 2c1e463c7e * Removed B_{MIN|MAX}_PRIORITY from OS.h - they were never really intended
as public defines. They are now called THREAD_{MIN|MAX}_SET_PRIORITY to
  better reflect what they are for. Minimum priority is now 1, ie. you no
  longer can set another thread to the idle priority. This fixes part of
  ticket #2959.
* set_thread_priority() will no longer allow to change the priority of the
  idle thread to something else. This fixes the rest of ticket #2959.
* Automatic whitespace cleanup in OS.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-05 18:11:58 +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
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
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
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
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
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 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