Commit Graph

2742 Commits

Author SHA1 Message Date
Axel Dörfler 15ab0bcf01 * int32_t, uint32_t are now of type "int", and no longer of type "long".
This should help to reduce the number of warnings imported code will throw
  during compilation (helps a lot with tcpdump, for example).
* Since long is 64 bit on 64 bit platforms, we might want to think about doing
  that change for the Haiku types int32 and uint32 as well.
* Fixed several occurences of hidden type problems.
* Fixed build of the stack and TCP under BeOS.
* Fixed incorrect typedef in socket_interface.h.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-21 20:10:43 +00:00
Stephan Aßmus 359f014e4e * part of libbe_test build fix... why is the _IMPEXP stuff there in the
first place? Is it even needed?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-21 15:19:25 +00:00
Axel Dörfler e544dd5915 * Fixed a possible dead lock between the kernel daemon and the DDM; the media
status checker now only tries to lock the manager, it won't wait anymore.
* Added MediaChanged() and UpdateMediaStatusIfNeeded() methods to KDiskDevice.
* KDiskDeviceManager::_CheckMediaStatus() now uses these new methods; it should
  no longer detect removed media more than once :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-19 15:20:36 +00:00
Axel Dörfler d73d20e85c Fixed warning when compiling the PS/2 bus manager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-18 17:23:14 +00:00
Ingo Weinhold 9417631f64 * Made _CountDescendants() public.
* Added private _ChildAt() and _CountChildren(), which don't ask the
  delegate, thus reflecting the hierarchy as it was before changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-18 03:42:30 +00:00
Ingo Weinhold 013e7894b7 We need flags to track what properties of the partition change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-18 03:39:50 +00:00
Ingo Weinhold 1573b62671 * Removed the BDiskDeviceJob class. Jobs won't be generated and executed
in the kernel anymore. The respective functionality will be moved into
  the userland. Depending on how we want the API user to interface with
  it, we may want to reintroduce a similar class later.
* Cleared remaining references to shadow partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 22:56:23 +00:00
Ingo Weinhold 27d7c36659 * Reimplemented BDiskDevice::IsModified()/
{Prepare,Commit,Cancel}Modifications() using the userland add-on
  backend. IsModified() and CommitModifications() are little more than
  stubs ATM.
* Made BPartition::VisitEachChild()/VisitEachDescendant() const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 21:50:20 +00:00
Ingo Weinhold 46b93b2cfd Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 20:51:10 +00:00
Axel Dörfler 8047441723 The disk device manager now periodically checks for media changes - all it does
is dump its findings, but it's an (untested) start.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 17:05:48 +00:00
Ingo Weinhold c9518b6240 Removed some now obsolete methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 01:04:53 +00:00
Ingo Weinhold fe6bd3b5b7 * Moved GetNextSupportedType() and IsSubSystemFor() from
BDiskSystem to BPartition and reimplemented them using the userland
  add-on backend instead of syscalls. As a side effect this solves the
  TODO I recently added in GetNextSupportedType().
* Reimplemented BDiskSystem::GetTypeForContentType() using the userland
  add-on backend instead of a syscall.
* Moved GetTypeForContentType() and IsSubSystemFor() from
  BPartitionHandle to BDiskSystemAddOn. They were misplaced.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 01:01:49 +00:00
Axel Dörfler e7e325508b Allocating additional memory should now work on the i965 as well (but bad things
will happen on earlier i9xx chips for now...). Not yet tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-16 16:52:34 +00:00
Ingo Weinhold b62085b975 Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-16 00:32:41 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Axel Dörfler 332d5f437e Some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 14:09:14 +00:00
Axel Dörfler c278448653 * Introduced a monitor_info structure and means to let it be filled by the
accelerant (or the app_server via EDID info). It's still experimental
  API, and opinions are welcome.
* Moved BPrivateScreen into the BPrivate namespace.
* Rewrote Screen.h.
* Introduced a BScreen::GetMonitorInfo() method, and implemented it in the
  app server as well (ie. AS_GET_MONITOR_INFO).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 11:41:47 +00:00
Ingo Weinhold 28541deac2 Beginning of the integration with the new userland disk system add-on
based code. Small API changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 00:41:18 +00:00
Axel Dörfler 6a0f39da22 Applied patch by Julun: time computations based on an algorithm by Fliegel,
and van Flandern (1968), instead of those inefficient loops we had before.
Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 17:27:44 +00:00
Axel Dörfler 53d781f439 * Now uses the new create_display_modes() function.
* Now supports the new B_GET_EDID_INFO hook under Haiku.
* Fixed build under BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 12:31:51 +00:00
Ingo Weinhold 08baf63a9f Decided that BPartition::ImmutableDelegate would basically be a big
collection of no-op methods, which could as well be implemented in
BPartition itself. This makes the Delegate hierarchy unnecessary:
MutableDelegate becomes Delegate, and we save a few casts as a side
effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 00:07:03 +00:00
Ingo Weinhold 350043e707 * Initialization of BPartition::Delegate is now two-phased. The first phase
builds the object hierarchy, the second will (in case of MutableDelegate)
  let the disk systems do their initialization. This way the disk systems
  already find a fully functional object hierarchy they can work with.
* Child creation also takes a partition name as a parameter, now.
* Implemented BMutablePartition child creation/deletion.
* The BDiskSystemAddOn/BPartitionHandle::Validate*() methods return a
  status_t instead of a bool, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-13 21:29:33 +00:00
Ingo Weinhold 103ca6a3ad The info about partitionable space will be provided by the userland disk
system add-ons. First work to make this class usable for them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-13 21:17:26 +00:00
Ingo Weinhold b3e7c4a4b9 * Added fDelegate member.
* Removed private AutoDeleter class. The shared ArrayDeleter is used instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-13 21:13:02 +00:00
Karsten Heimrich 98148bd6c5 * this should fix the build on gcc4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 22:47:42 +00:00
Axel Dörfler 7bdf92f3f7 Started a create_display_modes() function that should be used by accelerants
to create their mode list. Once it's done, it should cover all possible cases,
and allow the base mode list to reside in the app_server (under Haiku, at least),
so that all drivers will benefit from an updated list.
Right now, it might already work to a degree, but it's not yet tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 15:59:50 +00:00
Axel Dörfler 13a81299f1 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 15:56:08 +00:00
Stefano Ceccherini 65e63b987d PaletteConverter now exports a static InitializeDefault() method, which
can be used (and is, by _init_interface_kit()) to initialize the ... 
er... default instance of 
PaletteConverter using the system color map, thus avoid building the 
list of colors, which takes some time. Fixes bug #505.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-11 13:30:56 +00:00
Axel Dörfler f8941839c3 * Reworked stealing pages: the page thief thread is gone now,
vm_page_reserve_pages() and vm_page_allocate_page() will now steal pages from
  the inactive queue as needed.
* We currently never steal active pages anymore, but this might need to be
  revised later (therefore, the page scanner never waits anymore, but uses
  mutex_trylock() to lock a cache).
* The page scanner and writer now both run at normal priority - let's see how
  that will work out.
* Introduced an inactive queue.
* Instead of shuffling pages around in the queue (and therefore destroying LRU)
  the page stealing mechanism now uses a marker page to be able to release the
  page lock without losing its position in the queue.
* The page writer now always grabs the whole release count of the semaphore, so
  that there won't be a huge backlog to catch up with. 
* vm_page_num_free_pages() now also includes the inactive queue as well as the
  reserved pages (they are no longer regarded as free pages).
* Added a insert_page_after() function that inserts a page after another one,
  needed by the marker code.
* clear_page() now gets a vm_page instead of a physical address which simplified
  some code.
* Removed superfluous initialization of the queues (if those aren't zeroed on
  start, we would have serious problems, anyway).
* Removed old and unimplemented dump_free_page_table() ("free_pages") KDL
  command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-11 08:01:18 +00:00
Ingo Weinhold 15ed7c71d6 More fleshing out the disk system add-on interface and related classes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-10 21:35:22 +00:00
Ingo Weinhold 67c578e73f Added global lock that can be used for lazy initializations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-10 21:30:51 +00:00
Axel Dörfler 477c9d1dc0 * vm_set_area_protection() would remap the whole area instead of just the page
it intended to. That resulted in more writable pages where you wouldn't want
  them (ie. allowing the area to change pages in lower caches).
* We were losing modified pages: vm_unmap_pages() sometimes has to preserve
  the modified flag (eg. when called from page fault).
* Both of these were responsible that stealing active pages would crash
  applications - even if less likely, this could also have happened when
  stealing inactive pages. Therefore, I've activated stealing active pages
  again.
* The page writer now pushes the pages of busy vnodes to the end of the queue,
  so that it won't pick them up again too soon (the vnode destruction would
  be in the process of writing those pages back, anyway).
* The page thief now triggers the page writer to run once it has to steal
  active pages. This might be a bit too aggressive, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-09 11:05:50 +00:00
Axel Dörfler 0710d59c1c * Added a "canWait" argument to vfs_get_vnode() - you can use this to ignore
busy vnodes.
* dir_create_entry_ref() used get_vnode() incorrectly (and could therefore
  potentially prevent a file system from doing proper locking when called
  from the kernel).
* The vnode_store now uses this for its acquire_unreferenced_ref()
  implementation (and therefore for the page writer).
* read_into_cache() and write_to_cache() were still marked inline.
* The system will now wait 10 secs for a busy vnode before returning an error.
* It will also no longer panic in that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-08 16:06:32 +00:00
Ingo Weinhold 98b97f9603 First draft of the userland disk system add-on interface. A good deal of
functionality of the kernel add-ons will be moved into userland, which
will simplify the kernel-side significantly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-08 01:33:46 +00:00
Ingo Weinhold bf95c9aee6 * The shadow_changed() FS and partitioning system hooks take an
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
  the kernel, since it is no input parameter. It also copies back the
  actual partitionable spaces count on error, now -- B_BUFFER_OVERFLOW
  is returned when the buffer was too small, but then the count must be
  returned too.
* Fixed several instances of syscall implementations that unloaded a disk
  system, although they didn't load it in the first place. This screwed
  up the load count with undesirable consequences.
* _user_create_child_partition() would set the size to the supplied
  offset.
* Fixed broken loop in KPhysicalPartition::CreateShadowPartition().
* KPartition::RemoveChild() notified the listeners about the wrong
  event.
* Intel partitioning module:
  - The *_get_partitionable_spaces() correctly return B_BUFFER_OVERFLOW
    now, if the supplied buffer is too small.
  - Implemented a part of pm_shadow_changed(), which creates and updates
    the PartitionMap, so that the validate_*() hooks have a chance to
    work at all.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:39:35 +00:00
Ingo Weinhold a68ceab8df Fixed comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:17:38 +00:00
Ingo Weinhold 04adb291a6 Clear the user_partition_data::user_data fields before updating the
BPartition structure with the data retrieved from the kernel. For new
partitions the field is not set in the next step and later code would
use an initialized pointer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 14:56:26 +00:00
Ingo Weinhold 7ede8e4494 Added [Content]Parameters() getters.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 14:52:54 +00:00
Axel Dörfler c950f17a51 * Added a acquire_unreferenced_ref() to vm_store
* his has to be used by the page writer to make sure the vnode is still valid.
* This should have been the final nail on the Luposian bug - I haven't tested
  it yet, but we'll certainly see :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 15:35:38 +00:00
Axel Dörfler 80f5469291 * struct vnode is an opaque type now, removed void* where it was used incorrectly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 15:33:12 +00:00
Axel Dörfler 0e18334057 * Mapping a page might actually need memory - since we usually have locks that
interfere with the page thief, we always need to have reserved a page for
  this upfront. I introduced a function to the vm_translation_map layer that
  estimates how much pages a mapping might need at maximum. All functions that
  map a page now call this and reserve the needed pages upfront.
  It might not be a nice solution, but it works.
* The page thief could run into a panic when trying to call vm_cache_release_ref()
  on a non-existing (NULL) cache.
* Also, it will now ignore wired active pages.
* There is still a race condition between the page writer and the vnode
  destruction - writing a page back needs a valid vnode, but that might just
  have been deleted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 11:18:21 +00:00
Ingo Weinhold 0cf4ed1de6 MoveFrom() was broken. Fixes bug #1534.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-05 16:56:48 +00:00
Ingo Weinhold db5c68ca46 * Added the partition size as parameter to the file and partitioning
system initialize() hooks. It's often the only info about the
  partition one needs and thus locking the partition just to get it is
  no longer necessary.
* intel partitioning system:
  - Removed passing around block sizes. We require 512 byte sectors
    anyway. In fact using the parent partition's block size was even
    wrong.
  - Simplified writing the partition map sector.
  - Simplified and corrected the partition map initialization.
  - We don't fail identifying a partition anymore, if the partition map
    contains no partitions. We would never identify a freshly
    initialized partition map before.
  - Made pm_identify() more intelligent: It determines the priority to
    return depending on whether the partition is the device itself and
    whether we have recognized child partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:48:18 +00:00
Ingo Weinhold 6748659272 Added an identify_file_system() hook to the FS modules. The boot loader
does no longer give partitioning systems precedence over file systems.
The one with the greater identification priority wins. ATM, if a file
system wins, we still mount the first file system that recognized the
partition at all, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:16:31 +00:00
Ingo Weinhold 8c8f8c8420 Added scan_partition() function which can be used by disk systems (e.g.
in *_initialize()) to save some work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:03:24 +00:00
Axel Dörfler 9d8c209014 * vm_remove_all_page_mappings() now returns an accumulation of the flags of
the unmapped page.
* This is needed by everyone who calls this to make sure modifications to a
  page aren't ignored. Namely, the page scanner and the page thief were
  affected.
* Cleaned up locking the page's cache a bit in page_thief(); there is now
  a helper class that takes care of everything.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 16:36:35 +00:00
Axel Dörfler 3e9513aa4a * fs_{write|read}_pages() now has an additional argument "mayBlock".
* the page writer don't allow to block, while all other writers do. This fixes
  bug #1509. The reason the page writer needs this is because it marks several
  pages from different caches as busy.
* Fixed a warning about ASSERT being defined already in BFS, since
  util/DoublyLinkedList.h now includes debug.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 12:45:15 +00:00
Ingo Weinhold 45f9d60c9f Some KDEBUG enabled sanity checks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:22:21 +00:00
Ingo Weinhold 76ab7bdcf8 Added function dprintf_no_syslog(). It is basically equivalent to
dprintf() with the exception that it doesn't write anything to the
syslog. The reason is that syslog_write() releases a semaphore and can
therefore not be invoked when the thread spinlock is held.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:14:53 +00:00
Ingo Weinhold 636bfc08ae * Renamed fs/vfs_select.cpp to wait_for_objects.cpp and got rid of
vfs_select.h, respectively moved most of it into the new kernel
  private header wait_for_objects.h.
* Added new experimental API functions wait_for_objects[_etc](). They
  work pretty much like poll(), but also for semaphores, ports, and
  threads.
* Removed the "ref" parameter from notify_select_events() and the
  select_sync_pool functions as well as from fd_ops::fd_[de]select(). It
  is no longer needed. The FS interface select() hook still has it,
  though -- the VFS will always pass 0.
* de]select_fd() take a select_info* instead of a select_sync* + ref
  pair, now. Added respective functions for semaphores, ports, and
  threads.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 19:47:31 +00:00
Ingo Weinhold d0c2af7713 Addressed a deadlock race condition: Acquiration of condition variable
and thread spinlock was reverse in Wait() and Notify(). The thread lock
is now the outer lock -- this way it is still possible to call Notify()
with the thread lock being held.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 22:24:42 +00:00
Ingo Weinhold 1221a4f200 Allow derived classes to access the member variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 18:39:02 +00:00
Ingo Weinhold 66c03dc3a9 * fd.c -> fd.cpp
* Reworked the select support:
  - The io_context additionally stores a table of lists of select_infos,
    which enables it to deselect events of a pending select() when
    closing a FD. This prevents a race condition potentially causing a
    write to stale memory.
  - The opaque selectsync* passed to FSs is now actually a select_info*.
    This was necessary, since the FDs deselect() hook (unlike the
    select() hook) doesn't take a "ref" argument and deselecting a
    single info (e.g. caused by a premature close()) was not possible.
    The select() hook's "ref" argument has become superfluous.
  - It should now be relatively easy to implement a poll_on_steroids()
    that can also wait for objects other than FDs (e.g. semaphores,
    ports, threads etc.). 
* Set/reset the signal mask in common_select(). This makes pselect()
  work as required.
* Reorganized vfs_resize_fd_table().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-01 01:37:28 +00:00
Axel Dörfler b062823d81 * register_low_memory_handler() was called too early by several kernel
components - now, we divide the initialization of that service into two parts
  which allows this (before, most handlers were gone after boot).
* Added debugger command that dumps the low memory handlers.
* The slab allocator now registers its low memory handler with a higher
  priority, so that it'll run before the potentially heavier ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-29 15:46:40 +00:00
Ingo Weinhold eee9e86c6b Set default template argument to void, so that one doesn't need to
bother.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:40:25 +00:00
Marcus Overhagen ece77b379a renamed SCSI_OP_TUR into SCSI_OP_TEST_UNIT_READY
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 21:30:53 +00:00
Axel Dörfler a6778735f9 bonefish+axeld:
* We now have a page writer that takes some pages from the modified queue
  and writes it back every few seconds. It can be triggered by the page
  scanner to do that more often, though. That mechanism can be greatly
  improved once we have our I/O scheduler working.
* Removed vm_page_write_modified_page() again - it was all "eaten up" by
  the page writer.
* Reworked vm_page_write_modified_pages() a bit: it now uses
  vm_test_map_modification() and vm_clear_map_flags() instead of the
  iterating over all areas which wouldn't even work correctly.
  The code is much simpler now, too.
* You usually put something to the tail of a queue, and remove the contents
  from the head, not vice versa - changed queue implementation to reflect this.
* Additionally, there is now a enqueue_page_to_head() if you actually want the
  opposite.
* vm_page_requeue() allows you to move a page in a queue to the head or tail.
* Replaced vm_clear_map_activation() with vm_clear_map_flags() which allows
  you to clear other flags than PAGE_ACCESSED.
* The page scanner dumps now some arguments with each run.
* Removed the old disabled pageout_daemon() from NewOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 15:50:26 +00:00
Marcus Overhagen 8ce98e44cc convert files to new include file locations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:53:42 +00:00
Marcus Overhagen 1e2722379a splitting the file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:19:08 +00:00
Marcus Overhagen 641e015e6e this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:08:52 +00:00
Marcus Overhagen 178bce195a this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:07:23 +00:00
Marcus Overhagen 4ecfa05eb3 this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:06:24 +00:00
Marcus Overhagen 5451eb688b this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:05:55 +00:00
Marcus Overhagen 7d4093aa23 this header should be private
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-28 14:04:05 +00:00
Axel Dörfler 5c4ed86b56 * Moved some definitions from vm_types.h that functions in vm.h need as
arguments into vm.h.
* This should fix the broken build from earlier - thanks Stefano for the note!
* That also allowed to clean some other includes a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-27 13:01:18 +00:00
Axel Dörfler e6dc7903e4 * vm.h no longer includes vm_types.h - only those that actually need access
to the private VM types are including vm_types.h now.
* Removed vm_page, vm_area, vm_cache, and vm_address_space typedefs; it's
  cleaner this way, and the actual types are only used in C++ files now,
  anyway.
* And that caused changes in many files...
* Made commpage.h self-containing.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-27 12:21:33 +00:00
Axel Dörfler 393fceb5a0 * Cleaned up vm_types.h a bit, and made vm_page, vm_cache, and vm_area
opaque types for C.
* As a result, I've renamed some more source files to .cpp, and fixed
  all warnings caused by that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-27 10:29:05 +00:00
Axel Dörfler 8692ec023c * Renamed vm_page_write_modified() to vm_page_write_modifed_pages() and
introduced a new vm_page_write_modified_page().
* Resolved a TODO: vm_page_write_modified_pages() did not mark a to be
  written page busy but unlocked its cache which could let someone else
  steal that page in the mean time.
* Moved the logic when to move a page to the active or inactive queue to
  a new function move_page_to_active_or_inactive_queue().
* Moved page_state_to_string() to vm_page(); it's now also used by the
  "page" and "page_queue" KDL commands.
* Made the output of the "page_queue list" command more useful.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-26 20:19:51 +00:00
Axel Dörfler 8e0f884c71 * Since the page scanner and thief can work more effectively when no vm_caches
are locked, there is now a vm_page_reserve_pages() call to ensure upfront that
  there is a page for me when I need it, and may have locked some caches.
* The vm_soft_fault() routine now makes use of that feature.
* vm_page_allocate_page() now resets the vm_page::usage_count, so that the file
  cache does not need to do this in read_chunk_into_cache() and
  write_chunk_to_cache().
* In cache_io() however, it need to update the usage_count - and it does that
  now. Since non-mapped caches don't have mappings, the page scanner will punish
  the cache pages stronger than other pages which is accidently just what we
  want.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-26 17:42:25 +00:00
Axel Dörfler 6d4aea4796 bonefish+axeld:
* Removed the vm_cache/vm_store ref_count duality that besides being a bit ugly
  also created the page dameon cache retrieval problem: now, only areas (and
  cache consumers) retrieve a reference to the store (and therefore, the vnode).
  The page daemon doesn't need to care about this at all anymore, and the pseudo
  references of the vm_cache could be removed again.
* Rearranged deletion of vnodes such that its ID can be reused directly after
  fs_remove_vnode() has been called.
* vm_page_allocate_page() no longer panics when it runs out of pages, but just
  waits for new pages to become available using the new sFreeCondition condition
  variable - to make sure this happens in an acceptable time frame, it'll
  trigger a run of the low memory handlers.
* Implemented a page_thief() that steals inactive pages from caches and puts
  them into the free queue. It runs as a low memory handler.
* The file cache now sets the usage count on the pages it inserts into the
  cache (needs some rework though, cache_io() doesn't do it yet).
* Instead of panicking, the kernel will currently dead lock in low memory
  situations, since BFS does a bit too much in bfs_release_vnode().
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-26 00:20:23 +00:00
Axel Dörfler 2b14cdd11c * Added a mutex_trylock() function.
* Replaced release_sem() with release_sem_etc() for future addition of the
  B_DO_NOT_RESCHEDULE flag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-25 16:41:52 +00:00
Axel Dörfler 8c657126cd * Removed unused vm_page::busy_{reading|writing} fields.
* Fixed vm_page_allocate_page_run(): it did not take the pageState into account,
  and would therefore return uninitialized memory (ie. B_CONTIGUOUS areas would
  contain garbage).
  Now, it stores if a page is cleared in a new vm_page::is_cleared field.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-25 15:04:29 +00:00
Rudolf Cornelissen 7abeaef54d added engine command fifo setup for TCL_PRIMITIVE_3D for NV15 only for now (testing). Over here the NV15 keeps running and the command seems responsive. I hope this doesn't crash other NV15's outthere.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-24 14:12:18 +00:00
Axel Dörfler cbd4081064 * Fixed PLL timing computation for the i9xx chips - I mixed post2 min/max values, and did
not take the VCO limits into account; both could (and would during testing) create invalid
  frequencies.
* Also reverted the order in which the PLL divisors are traversed to match the order of what
  is used in the X driver to create comparable output (our error computation is based on float,
  though, and should therefore create more accurate values).
* The i965 introduced a special register for the surface; the former display base register
  is now only used for the view offset. Instead of setting the base manually here and there,
  there is now a set_frame_buffer_base() function.
* The DPMS code will now also turn off/on the PLL clock generator.
* The code needs some more cleanup, and while the driver now produces the correct timing on
  my i965 system, I'm now greeted by a black screen after startup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-24 09:02:35 +00:00
Axel Dörfler 523a30f313 Implemented I2C support to get the DDC EDID info from the monitor - it's working as is, but
nothing is done with the data yet (besides dumping them to the serial output).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-21 18:06:56 +00:00
Axel Dörfler 96eb4ebe33 Made i2c.h and ddc.h C++ safe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-21 17:33:35 +00:00
Axel Dörfler 93a1ccabb9 * Separated I2C from DDC a bit more.
* i2c_bus now contains a i2c_timing structure, so that you don't need
  both to talk to the I2C bus.
* Therefore, there is now a void ddc2_init_timing() function to get the
  the timing DDC needs.
* Cleanup in radeon's monitor_detection.c, and updated it to work with
  the DDC/I2C changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-19 22:36:55 +00:00
Axel Dörfler 0c85ed21ae Forgot to commit the header...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-19 18:52:55 +00:00
Rudolf Cornelissen 1deda8e758 added some defines for NV50 arch, G8x. Removed the comment indicating difference between TNT and GF style setup for 3D: that's not really there. Judging from Nouveau it's still the same setup (more or less), there are just some new commands including TNL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-19 17:17:22 +00:00
Rudolf Cornelissen 6a571d88ac fixed shared_info problem occuring with the 3D accelerant: the TVencoder list definition is now outside of the definition of shared_info. Greetings.. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-18 19:22:44 +00:00
Stefano Ceccherini b1af0a7a24 Setting the font shear in a BPicture didn't work, because the value was
treated as uint32 in some places, when it's a float.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-10 10:20:26 +00:00
Ingo Weinhold 40c3aedf8d * Added hash_count_elements() and hash_count_used_slots() (mainly for
diagnostic purposes).
* hash_init() adjusts the table size to a prime number, which should
  result in a better element distribution, particularly since usually a
  power of two is passed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-09 17:19:52 +00:00
Ingo Weinhold c8a342a476 * The method vm_cache_remove_consumer() and the page daemon used to get
a reference to a by them not yet referenced cache was not correct.
  They only incremented the reference count, but a vnode cache reference
  includes also a vnode reference. In case of the page daemon this would
  cause vnode references to be lost (causing bug #1465).
* The page daemon used an unsafe method to access a yet unreferenced
  page cache. There was nothing that prevented the cache from being
  deleted while the page daemon tried to get a reference. The
  vm_page::cache field is now protected by the page cache table
  spinlock, too, which the new function
  vm_cache_acquire_page_cache_ref(), used by the page daemon, also
  acquires while trying to get the reference.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-09 14:36:10 +00:00
Ingo Weinhold 6b6f6b7240 Partitions do now know whether they have already been published and
avoid attempts to publish a second time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-07 00:05:06 +00:00
Ingo Weinhold 923efaa872 * We store the ID of the controlling terminal and the foreground process
group ID with the session and let the terminal update them.
* Added an "orphaned" flag to the process_group structure and code to
  maintain it.
* Handle the death of a controlling process correctly: The
  foreground process group gets a SIGHUP and all newly-orphaned process
  groups containing at least one stopped processes are sent
  SIGHUP+SIGCONT.
* The tty handles the O_NOCTTY flag correctly, now.
* The tty handles reads/writes from processes from other sessions
  correctly, now.
* Handle tcsetpgrp() from background processes correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 02:16:25 +00:00
Ingo Weinhold df716df51d * Added is_signal_blocked() convenience function.
* Defined flag SIGNAL_FLAG_TEAMS_LOCKED for send_signal_etc(), so it can
  be called with the team lock being held.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 02:03:43 +00:00
Ingo Weinhold 33f0dbe40a * Resolved TODO: waitpid() clears pending SIGCHLD, if the signal is
blocked and no other child status is available.
* Respect SA_NOCLDWAIT and ignored SIGCHLD in waitpid(): Unless a child
  status is available immediately, the thread shall block until all
  children are gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 21:35:24 +00:00
Axel Dörfler 87689e25ea * sMappingLock is now a mutex instead of a spinlock.
* The vm_translation_map is now correctly held in all of the vm_ mapping
  functions.
* Removed the old vm_daemons.c file - there is now a new vm_daemons.cpp
  which contains the beginnings of our new page daemon.
  So far, it's pretty static and not much tested. What it currently does
  is to rescan all pages in the system with a two-handed clock algorithm
  and push pages into the modified and inactive lists.
* These inactive pages aren't really stolen yet, even though their mappings
  are removed (ie. their next access will cause a page fault). This should
  slow down Haiku a bit more, great, huh? :-)
* The page daemon currently only runs on low memory situations, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 15:41:14 +00:00
Ingo Weinhold d2056c9933 * Added "caches" debugger command (to be enable by defining
DEBUG_CACHE_LIST) that prints an unspectacular list of pointers to all
  existing caches. Feel free to extend.
* Enhanced MultiAddressSpaceLocker:
  - It supports choosing between read and write lock per address space,
    now.
  - Added AddAreaCacheAndLock(), which adds the address spaces of all
    areas that are attached to a given area's cache, locks them, and
    locks the cache. It makes sure that the area list didn't change in
    the meantime and optionally also that all areas have their
    no_cache_change flags cleared.
* Changed vm_copy_on_write_area() to take a cache instead of an area,
  requiring it to be locked and all address spaces of affected areas to
  be read-locked, plus all areas' no_cache_change flags to be cleared.
  Callers simply use MultiAddressSpaceLocker:: AddAreaCacheAndLock() to
  do that. This resolves an open TODO, that the areas' base, size, and
  protection fields were accessed without their address spaces being
  locked.
* vm_copy_area() does now always insert a cache for the target area. Not
  doing that would cause source and target area being attached to
  the same cache in case the target protection was read-only. This
  would make them behave like cloned areas, which would lead to trouble
  when one of the areas would be changed to writable later.
* Fixed the !writable -> writable case in vm_set_area_protection(). It
  would simply change the protection of all mapped pages for this area,
  including ones from lower caches, thus causing later writes to the
  area to be seen by areas that shouldn't see them. This fixes a problem
  with software breakpoints in gdb. They could cause other programs to
  be dropped into the debugger.
* resize_area() uses MultiAddressSpaceLocker::AddAreaCacheAndLock() now,
  too, and could be compacted quite a bit.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:55:23 +00:00
Ingo Weinhold addece2001 * Fixed incorrect check in condition_variable_interrupt_thread().
Condition variables would never be interrupted.
* ConditionVariableEntry::Add() did not correctly insert the entry into
  the per-thread list of entries (the next link of the previous entry
  was not adjusted), which could leave the entry unnotified when the
  previous entry was notified, thus leaving it in the respective
  condition variable's list after the end of its life time. This should
  fix a crashing bug I rarely encountered.
* Added debug checks in the PrivateConditionVariableEntry
  constructor/destructor that should have helped me to find
  forementioned bug hours earlier, had I been bright enough to realize
  that I didn't include <debug.h> and those KDEBUG guarded checks were
  never executed. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:21:26 +00:00
Ingo Weinhold 667f1eeb67 * Added support for setting (hardware) break-/watchpoints in the kernel.
Can be enabled by defining KERNEL_BREAKPOINTS in arch/user_debugger.h
  and will provide the arch_{set,clear}_kernel_{break,watch}point()
  function. Hitting a break-/watchpoint will throw the thread into KDL.
* Finally added a comment, what's the point of
  i386_reinit_user_debug_after_context_switch(), since I wonder every
  time I see it. Should be optimized aways soon.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:04:36 +00:00
Ingo Weinhold fed5bce4e3 Made SetTo() deal with the lockable == NULL, alreadyLocked == true
correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 18:00:22 +00:00
Stephan Aßmus 3a38a48561 * fixed size layout of BMenuBar on BMenuField in fixed size mode
(needs to account for the parts that the BMenuField draws, ie the shadow
  on the right)
* fixed follow mode of BMenuBar in fixed size mode (B_FOLLOW_LEFT_RIGHT)
* don't resize the BMenuField in fixed size mode (endless loop), this should
  be more robust anyways, since this endless loop would be triggered if an
  application tried to manually resize menuField->MenuBar() in auto resizing
  mode
* fixed calculation of the parts that need to be redrawn on resize


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 22:36:14 +00:00
Jérôme Duval bb5ea4eb08 work from JiSheng Zhang : firewire and ohci modules from FreeBSD current, update for fw_raw and fw_control. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 21:59:49 +00:00
Ingo Weinhold 65a7804abe Set default team debug flags to 0. Threads of a team were
unnecessarily stopped, when another thread crashed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 01:10:46 +00:00
Ingo Weinhold 25938e2538 Thou shalt not use spaces in file names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 23:49:02 +00:00
François Revol fb8d275d43 Move this to media/, seems audio/ is only for old stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 12:31:55 +00:00
François Revol 6505ab3d1b OpenSound's driver API header, for use by OSS media node.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 12:24:29 +00:00
Ingo Weinhold 24bcf55926 * Introduced new job_control_entry structure which, among other things,
is used instead of death_entry for team::dead_children.
* Added team::{stopped,continued}_children, which, analoguously to
  dead_children, are used to track the state of stopped/continued
  children.
* A team does have a job_control_entry, which is allocated at team
  creation time. It will be inserted into the parent's
  {stopped,continued}_children lists as the team's main thread is
  stopped/continued and removed when waitpid() retrieves the child
  state. When the team dies the entry is detached from the team and goes
  into the parent's dead_children list.
* Removed the wait_for_any field from team_dead_children. It was solely
  used to avoid deletion of the contained entries in certain situations.
  wait_for_child() (the waitpid() backend) always deletes an entry now,
  regardless of whether other threads are waiting; that's in
  accordance with the waidpid() specification. wait_for_thread() removes
  the entry only, if the caller is the parent of the respective team.
* Introduced team_set_job_control_state() which performes the job
  control entry transitions between the respective lists and wakes up
  threads waiting in wait_for_child(). It is invoked on team death and
  when the team's main thread receives job control signals.
* Reorganized wait_for_child(). It handles WCONTINUED and WUNTRACED now,
  too. Removed a block that interpreted the supplied ID as thread ID.
* Added missing parts in waitpid().

Job control starts to work, though it seems to have some glitches.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 03:29:14 +00:00
Ingo Weinhold c9e5503e5e Notify*() and Unpublish() acquire the threads lock. So they need to know
whether the lock is already being held.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 02:25:14 +00:00
Ingo Weinhold be8990115c * Base class of InterruptsLocker was accidentially private.
* Added class InterruptsSpinLocker, which disables interrupts and
  acquires a spinlock all in one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 02:23:11 +00:00
Ingo Weinhold ff895459b7 * Replaced the team::dead_children::sem semaphore by a condition
variable. Due to C code including the header I had to turn it from and
  aggregated member to a pointer. I'm very close to starting to convert
  all remaining .c to .cpp files. :-/
* Got rid of the "waiters" field. It was only written, never read.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-27 20:30:34 +00:00
Ingo Weinhold 4ed7917682 Wait() returns a status_t now, which can be B_OK (condition variable
exists and thread was notified), B_ENTRY_NOT_FOUND (condition variable
not found or Unpublish()ed while waiting), or B_INTERRUPTED
(interrupted by a signal).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-27 20:17:31 +00:00
Ingo Weinhold ff308b0b49 Condition variables changes:
* Removed left-over commented C implementation.
* It is now possible for a thread to wait for more than one condition
  variable at a time.
* Made waiting for condition variables optionally interruptable.
* Renamed Notify() method to NotifyAll() and added a NotifyOne(), so
  that it is now possible to wake up only one of the waiting threads.
Pretty much untested at the moment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 23:53:12 +00:00
Ingo Weinhold 2652981136 Added Supports[Content]Name() methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 21:22:29 +00:00
Ingo Weinhold 76a8ec23db * Added disk system flags for whether a partition name and partition
content name are supported.
* Added file_system_module_info::flags (analogously to
  partition_module_info::flags) which indicate which disk device
  features the FS supports.
* Replaced the
  file_system_module_info/partition_module_info::supports_*()
  hooks by a get_supported_operations() hook and for partitioning
  systems additionally a get_supported_child_operations() hook.
* Updated file and partitioning systems accordingly.
* Updated fs_shell accordingly.
* Updated the DDM accordingly. The syscall interface remains unchanged,
  though.
* _user_supports_initializing_partition() also checks whether the parent
  partitioning system is content now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 21:21:30 +00:00
Stefano Ceccherini 0e5fe45f13 Removed unused DataBuffer class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-19 19:59:09 +00:00
Stephan Aßmus f591e3a0f2 * fix weird Shape op/point allocation
* handle out of memory situations
* don't try to copy (and assign op!) in SetData if opCount/ptCount is 0
-> FontDemo doesn't crash anymore eventually when cycling fonts in outline
mode


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 11:17:29 +00:00
Axel Dörfler 0b70ea5992 * Implemented sigaltstack() and set_signal_stack(), thus closing bug #1401.
* On exec() the new function thread_reset_for_exec() is called which clears the signals
  and cancels an eventually set alarm. Both things weren't done before...
* Some minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 18:01:47 +00:00
Stefano Ceccherini 422fadc829 Moved the dummy table local to the PicturePlayer::Play() function since,
as Marcus pointed out, having it outside wasn't thread safe. Moved 
PicturePlayer into the BPrivate namespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 14:40:03 +00:00
Stefano Ceccherini 46b4e48998 Added some debug output to PicturePlayer. Since checking the table size for every op is very slow, now we do that only at the beginning, and use a custom op table if needed. The best case (which is the one used when drawing a picture with BView::DrawPicture()) is very fast since it only requires one check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 09:14:03 +00:00
Stephan Aßmus 86d8381f5f * fixed libbe_test build, I guess this was caused by Ingo's recent change
to the header path variable?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-15 18:52:50 +00:00
Stefano Ceccherini 253d42a602 Implemented SetClipping op, but it's not working yet (looks like it's
never written into the data stream)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 15:21:15 +00:00
Ingo Weinhold 2a39e9e44e Made the remote_disk_server build under R5.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 14:54:09 +00:00
Stefano Ceccherini feb557a6d1 Implemented WriteSetFontFamily() and WriteSetFontStyle(). Only the
server side functions are missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 09:17:21 +00:00
Stefano Ceccherini 37033892c5 Implemented SetPattern op. Reduced the buffer size to 4096 again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 06:39:37 +00:00
Axel Dörfler f9a5b215cd Committed patch by Euan Kirkhope to improve routing problems with Radeon cards;
this should fix bug #1293.
I've tested it here on two machines, one works better now, the other stayed the
same (Radeon 9250, and a laptop FireGL (id 4c66) version). This apparently also
fixed bug #1394.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 17:22:32 +00:00
Stefano Ceccherini 690c7474a4 Implemented BPicture's SetPenLocation() op, also nested
AppendToPicture() (but still doesn't work :( ). Moved some functions 
around in PictureDataWriter.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 14:07:12 +00:00
Stefano Ceccherini ed5de868df Implemented the following BPicture ops: fill region, stroke/fill arc,
stroke/fill polygon, stroke/fill bezier. some work towards drawing of 
nested pictures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 07:20:43 +00:00
Michael Lotz 0127fb779d * Respect endiannes for item lengths inside swapped BMessages
* Also swap the flattened size when creating the read buffer
* Define specialized byte_swap()s for unsigned types too so that type_code and the like get swapped correctly

This should fix bug #1371.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 10:32:21 +00:00
Jérôme Duval 0a29487db5 fixed gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 19:53:20 +00:00
Ingo Weinhold 2529455101 Revised the AVLTreeMap code:
* Pulled the actual tree code into a non-templatized class AVLTree to
  reduce the amount of code generated each time the template is
  instantiated.
* Changed the iterator interface to Java-style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 14:57:25 +00:00
Ingo Weinhold 1873b4b37e Give the runtime loader a chance to reinit its semaphore after fork().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 00:14:26 +00:00
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
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
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
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
Stephan Aßmus 94a48ae276 * use a different message code for DrawString() with escapement delta
and DrawString() without
* this change also includes adding the penlocation to the shape to-screem
  coordinate conversion (temporarily breaks shape rendering, will be fixed
  in next commit)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-04 11:22:47 +00:00
Jérôme Duval acbe544d74 to please gcc4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 19:02:59 +00:00
Stephan Aßmus 2222864eed * complete overhaul of the font/glyph caching
* the previous AGG implementation is superfluous
* the new implementation is based on that one, but in a way that allows
  read/write locking to the list of cache entries (fonts) as well as
  read/write locking to the cached glyphs per individual font cache entry
* new GlyphLayoutEngine.h, which is to be the central place for layouting
  glyphs along the baseline.
  It handles the locking for getting the font cache entries.
  It works by giving it a template class GlyphConsumer which does the
  actual work.
* changed AGGTextRenderer to use the new font cache
* changed ServerFont::StringWidth(), and the bounding box stuff to use it
* changed DrawingEngine, it doesn't need the global font lock anymore
* our BFont thought that GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString
  is the same, which of course it isn't, hence the two separate functions...
  AsGlyphs just gets the bounding box of each glyph in a string, not treating
  the string as an actual word
  AsString adds the offset of the glyph in the word to the bounding box
* changed ServerProtocol.h accordingly for the different bounding box meaning


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 19:10:38 +00:00
Stephan Aßmus 075430faf4 * put some more useful utility classes into "shared". I tried to make sure
that OpenHashTable.h does not collide with all the other places that this
  is used, it seems everything still builds fine. Most problematic could be
  the OpenHashTable.h at kernel/util, but it seems it the target using
  that are not affected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 16:28:34 +00:00
Ingo Weinhold 9e12e9a72e * Added mapping of dup() in the FS shell.
* Adjusted the FS initialize() hook to have FD and partition_id
  parameters like the other hooks instead of the partition path.
* Adjusted initialization in BFS accordingly.
* Implemented the FS initialization method in KFileSystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 12:43:49 +00:00
Axel Dörfler edb15b5565 bonefish+axeld:
* Simplified the notification framework: removed the updater stuff completely;
  it was only there to account for some peculiarities of the node monitor which
  we now solved differently.
* NotificationListener no longer includes a doubly linked list link for convenience;
  it might want to listen to more than just one service.
* NotificationService cannot have an abstract destructor.
* Changed the _user_stop_watching() syscall to mirror the Be API; ie. it's no
  longer possible to just remove some flags separately, just to stop listening
  completely.
* Adapted the node monitor implementation to live in the NodeMonitorService class
  that uses the new notification framework.
* Removed the public kernel node monitor API - it wasn't useful that way since you
  couldn't do a lot with the KMessage in the kernel without using a private API.
  Now you will have to use the (private) notification manager to use the node monitor
  from inside the kernel. At a later point, we might introduce a public API for that,
  too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-01 14:48:44 +00:00
Axel Dörfler 5102d49461 * Added the default constructor to the Iterator class.
* Added a Current() method to the same class that returns the current element again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-01 14:28:50 +00:00
Jérôme Duval dc1e5b5351 work from JiSheng Zhang : fw_raw with firewire headers from FreeBSD current. Thanks!
clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 20:15:25 +00:00
Axel Dörfler a898ee19d6 Ahem... build fix. Forgot that there were some last minute changes that shouldn't have been part of the commit...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 17:17:51 +00:00
Axel Dörfler bec0386d82 bonefish+axeld: Implemented a robust notification framework for the kernel.
Will be used for node monitoring and other stuff, too (like the Registrar or the
VM low memory handler).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:23:40 +00:00
Axel Dörfler 2851dbad53 * Moved Referenceable.cpp to src/kits/support (private libbe API), and its header to
private/shared.
* Made AddReference() and CountReferences() inlines.
* The registrar is now using the private Referenceable version in libbe.so.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:20:37 +00:00
Axel Dörfler 8405223037 axeld+bonefish: Got rid of the ParentType in the HashTableDefinition; it doesn't really
belong there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-31 16:14:58 +00:00
Axel Dörfler 4bef3723a1 * Followed Ingo's suggestion and send the message manually in the runtime loader;
therefore, we could remove the ugly defines from KMessage again, and compile it
  with KMESSAGE_CONTAINER_ONLY.
* Added KMessage::SetDeliveryInfo() to be able to send messages with a correct
  header.
* Fixed a bug in KMessage::SendTo() that would not send the senderTeam when passing
  a negative value for the parameter, but override it when passing in a valid
  value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-29 21:36:49 +00:00
Ingo Weinhold 04ed91ac9c Added copy constructor and assignment operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-28 14:56:02 +00:00
Ingo Weinhold d86af8ce27 * Style cleanup.
* Moved method documentation from headers to source files.
* Fixed small problems (memory leaks, unsafe string duplication,...).
* Added TODOs where I spotted problems.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21721 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 16:32:47 +00:00
Ingo Weinhold 2dc6403ddc Addition of write support to the disk device manager. Courtesy of Tomas
Kucera and Jan Matejek.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 12:12:35 +00:00
Axel Dörfler 74c0424a43 * Added a mechanism to retrieve a BMessage with eventual error descriptions
for _kern_load_image().
* Added KMessage to the runtime_loader (a bit hacky, though) - it will use
  it to deliver the above mentioned functionality.
* load_dependencies() did return the wrong status code in case a library
  was missing; now it returns B_MISSING_LIBRARY.
* load_dependencies() will now try to load all dependencies when a report
  message is requested; therefore, all missing libraries are listed.
* Renamed uspace_program_args to user_space_program_args.
* The kernel filled in various members of the user_space_program_args structure
  unsafely, ie. was not using user_memcpy().
* Renamed some local variables in team.c to better fit our style guide (ie.
  uargs to userArgs).
* Changed Tracker to use the new _kern_load_image() variant on Haiku to retrieve
  and report all missing libraries. This fixes bug #1324.
* Adapted kernel_cpp.cpp to the runtime loader as well; the latter will now
  compile with _LOADER_MODE defined.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 02:32:19 +00:00
Axel Dörfler de52a13af7 Unconditionally enable all ASSERTs in the kernel for now; should obviously
be turned off for non-development releases later :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-23 00:59:30 +00:00
Stephan Aßmus 38287e02af * completed my changes to DrawState handling, the current DrawingState
of the active ViewLayer is now always mirrored in the Painter instance
  of a ServerWindow, so that it doesn't need to be synced on every drawing
  command, this was previously incomplete for font handling
* removed the DrawState parameter from all the DrawingEngine functions
* adjusted ServerWindow and ServerPicture accordingly
* made sure that string related functions used by non-drawing related
  parts (ServerApp, Decorator) don't interfere with the current drawing
  state
* moved AS_SYNC handling from _DispatchViewMessage to _DispatchMessage,
  it is actually a window message and doesn't require fCurrentLayer to
  be valid
* fixed bug #1300, fCurrentLayer was not updated when a ViewLayer was
  deleted by client request which happened to be fCurrentLayer (I am now
  handling it so that the parent becomes the current layer, could be
  wrong)
* AGGTextRenderer is no longer using it's own scanline, which should save
  a few bytes RAM, the Painter already had such an object
* StringWidth() in AGGTextRenderer is now taking the escapement_delta into
  account
* Painter::StrokeLine() doesn't need to check the clipping as much, since
  that is already done in DrawingEngine
* if a ServerWindow message is not handled because fCurrentLayer is NULL,
  a reply is sent in case the messages needs it (client window could
  freeze otherwise, waiting for the reply for ever)
* removed unused AS_SET_FONT and AS_SET_FONT_SIZE
* added automatic RGBColor -> rgb_color conversion to RGBColor.h
* minor cleanup for 80 char/line limit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-22 19:48:27 +00:00
Ingo Weinhold 6d1c68155a axeld + bonefish:
* More conditional debug code (wrt page transitions between caches).
* Replaced debugger command cache_chain by a nicer cache_tree.
* While handling a soft fault: When we temporarily unlock a cache, it
  can theoretically become busy. One such occurrence is now handled
  properly, two more panic() ATM, though should be fixed.
* When merging caches, we do now always replace a dummy page in the
  upper cache, not only when the concurrent page fault is a read fault.
  This prevents a page from the lower (to be discarded) cache from still
  remaining mapped (causing a panic).
* When merging caches and replacing a dummy page, we were trying to
  remove the dummy page from the wrong cache (causing a panic).

The Haiku kernel seems now to run shockingly stable. ATM, we have more
than two hours uptime of a system booted and running over network. We
didn't manage to get it down by fully building Pe, downloading, unzipping,
and playing with various stuff. Someone should finally fix all those app
server drawing bugs, though (hint, hint! ;-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 22:52:23 +00:00
Stephan Aßmus 93a30169f3 * fix the build, forgot to commit this...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:22:53 +00:00
Ingo Weinhold aeb67bdb8f Increased kernel stack size by another page. The network boot is more
stack hungry and would previously hit the stack limit and thus cause a
double fault. Hopefully we'll be able to reduce the stack foot print at
some time.
PXE boot does now fully work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 14:03:49 +00:00
Ingo Weinhold 16f392da37 Missing in the previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 13:33:41 +00:00
Axel Dörfler 58f6e8e5e4 * Merged vm_cache_ref and vm_cache to a single structure (Axel & Ingo).
* Renamed vm_cache.c to vm_cache.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-18 00:16:27 +00:00
Jérôme Duval d57634f732 the keymap is now saved when key locks or key modifiers are changed
this fixes bug #1282


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-16 18:40:32 +00:00
Jérôme Duval 2ff0a95e11 work from JiSheng Zhang : fwcontrol with firewire headers from FreeBSD current. Thanks!
clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 17:43:02 +00:00
Ingo Weinhold 9e8dc2a9bb [Sorry, couldn't split this one up any further.]
* Images preloaded by the boot loader had to be modules to be of any use
  to the kernel. Extended the mechanism so that any images not accepted
  by the module code would later be tried to be added as drivers by the
  devfs. This is a little hacky ATM, since the devfs manages the drivers
  using a hash map keyed by the drivers inode ID, which those drivers
  obviously don't have.
* The devfs emulates read_pages() using read(), if the device driver
  doesn't implement the former (all old-style drivers), thus making it
  possible to BFS, which uses the file cache which in turn requires
  read_pages(), on the device. write_pages() emulation is still missing.
* Replaced the kernel_args::boot_disk structure by a KMessage, which can
  more flexibly be extended and deals more gracefully with
  arbitrarily-size data. The disk_identifier structure still exists,
  though. It is added as message field in cases where needed (non net
  boot). Moved the boot_drive_number field of the bios_ia32 platform
  specific args into the message.
* Made the stage 1 PXE boot loader superfluous. Moved the relevant
  initialization code into the stage 2 loader, which can now be loaded
  directly via PXE.
* The PXE boot loader does now download a boot tgz archive via TFTP. It
  does no longer use the RemoteDisk protocol (it could actually be
  removed from the boot loader). It also parses the DHCP options in the
  DHCPACK packet provided by PXE and extracts the root path to be
  mounted by the kernel.
* Reorganized the boot volume search in the kernel (vfs_boot.cpp) and
  added support for network boot. In this case the net stack is
  initialized and the network interface the boot loader used is brought
  up and configured. Since NBD and RemoteDisk are our only options for
  net boot (and those aren't really configurable dynamically) ATM, the
  the boot device is found automatically by the disk device manager.

Booting via PXE does work to some degree now. The most grievous problem
is that loading certain drivers or kernel modules (or related activity)
causes a reboot (likely a triple fault, though one wonders where our
double fault handler is on vacation). Namely the keyboard and mouse input
server add-ons need to be deactivated as well as the media server.
A smaller problem is the net server, which apparently tries to
(re-)configure the network interface we're using to boot, which
obviously doesn't work out that well. So, if all this stuff is disabled
Haiku does fully boot, when using the RemoteDisk protocol (not being
able to use keyboard or mouse doesn't make this a particular fascinating
experience, though ;-)). I had no luck with NBD -- it seemed to have
protocol problems with the servers I tried.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 02:10:15 +00:00
Ingo Weinhold 0274089508 Never include anything in an extern "C" block.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:35:10 +00:00
Ingo Weinhold 3532662e0c Added RemoveLeaf() leaf method. Very handy for recursive directory
iteration code using a single KPath object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:34:17 +00:00
Ingo Weinhold dad631290c * Made header includable by C code. In this case a KMessage structure
with the same size as the class is defined.
* The SetTo() methods do now accept an unspecified (negative) bufferSize
  in case of being told to initialize from the given buffer.
* Added handy Get*() methods returning a field element value or a
  supplied default value, if the field element doesn't exist.
* Added also handy Set*() methods setting the value of first element of
  a field, i.e. adding it, if it didn't exist before, otherwise
  replacing the old value. Only for fixed size types.
* Moved _FindType() inline template method into the header.
* Made the source file fit for use in the boot loader. If the macro
  KMESSAGE_CONTAINER_ONLY is defined, the message sending/receiving part
  is omitted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:32:37 +00:00
Ingo Weinhold 5519ed578c Added AutoDeleter::Get().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-07 01:41:55 +00:00
Axel Dörfler d2d753669d * Renamed "EFI GUID Partition Table" to "EFI GUID Partition Map" to be consistent
with the other partition types.
* Added kPartitionTypeEFI to the constants.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-05 19:41:47 +00:00
Marcus Overhagen ca39427c4e cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-05 16:39:38 +00:00
Stephan Aßmus c1071005c9 * moved R3 audio driver interface definition to private headers along
with R3MediaDefs.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-01 13:09:27 +00:00
Axel Dörfler eef8417e27 * Added (non-working) EFI module to the boot loader and its test application.
* Fixed a warning in efi_gpt.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-30 15:31:01 +00:00
Michael Lotz 5dc45eb4fe * Unified handling of different BMessage formats into MessageAdapter.cpp
* Removed r5_message.cpp and dano_message.cpp accordingly
* Also moved out KMessage handling from Message.cpp to MessageAdapter.cpp
* Fixed some minor style issues in Message.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-27 20:22:53 +00:00
Axel Dörfler ca13bd31a7 * The Deskbar tray icon menu "Check Mail" and the status window "Check Now" button
are now only enabled if there are any inbound accounts.
* BMailSettings::StatusWindowFrame() now returns some useful defaults.
* Minor cleanup.
* The MDR kit needs some serious overhaul before it can be part of R1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-22 00:15:17 +00:00
Axel Dörfler 4976138306 * Korli renamed the driver, but forgot to let the driver ask for the new accelerant name.
* Added a TRACE_S3SAVAGE macro that turns on debug output - should be set conditionally
  if DEBUG is defined (see DriverInterface.h), but is currently always on, as requested
  by Gerald.
* Some minor style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 23:38:53 +00:00
Axel Dörfler 245aecda8a Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 19:50:57 +00:00
Axel Dörfler 0cb94db539 Ingo and I fixed a couple of VM bugs in a late night debugging session:
* vm_copy_on_write_area() now does no longer overwrite the ref_count, but keeps
  it's reference to the cache until it has unlocked it.
* It now also locks its reference from the start, preventing any other thread
  to interfere.
* vm_cache_remove_consumer() now detects if it has to remove a foreign busy
  page itself in order to preserve a mapped page.
* vm_soft_fault() now keeps a reference to the cache that owns the page to be
  mapped until it has actually mapped it.
* vm_unmap_pages() removed the mappings of all pages of the area instead of only
  those that are within the requested range.
* Kept (disabled) debug output for convenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 13:57:46 +00:00
Travis Geiselbrecht c9788912f0 re-enable kernel asserts.
Disabled by default, but all kernel devs are *highly* recommended to turn them on for your builds and see if it trips anything, and then fix it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-21 05:37:46 +00:00
Jérôme Duval 2d6d529814 Passed GENERAL_ERROR_BASE from LONG_MIN to INT_MIN (errors are uint32).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 21:58:02 +00:00
Jérôme Duval 5c937cfa82 missing comment tokens
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 21:30:00 +00:00
Jérôme Duval 77112c06de missing comment tokens
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 21:20:11 +00:00
Ingo Weinhold ec592aa9e5 Implement _BMCMenuBar_::MaxSize() to override BMenuBar::MaxSize() and limit
the maximum width. The latter supports unlimited maximum width. The
_BMCMenuBar_ draws fine when resized wider than its min/preferred width, but
not the complete "button" area will cause the menu to open when being pressed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 23:09:01 +00:00
Stephan Aßmus 45f929b494 * added BCommandPipe class (currently private API) kindly provided by
Ramshankar
* adopted to Haiku coding style


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 12:38:29 +00:00
Stefano Ceccherini ffcd67bc82 moved duplicate code to a common location.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 14:30:56 +00:00
Stefano Ceccherini 7f0898e76f bye bye ClientFontList.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:45:33 +00:00
Stefano Ceccherini ac2284ed8b Moved ZombieReplicantView.h to src/kits/interface
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:38:14 +00:00
Stefano Ceccherini 7c42f05d49 moved kZombieColor to ZombieReplicantView.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:37:42 +00:00
Stefano Ceccherini fab61b6237 Moved TextInput.h to src/kits/interface as it's only used there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:31:46 +00:00
Jérôme Duval a3ca7ebc40 x86_64 changes :
added atomic*64() functions
use int32 instead of long


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 10:50:18 +00:00
Jérôme Duval de050c6029 incorporated savage driver sources from Gerald Zajac. I hope it's the good place for this.
fixed warnings and code style. Please, from now on, provide *patches* to this version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-15 21:02:08 +00:00
Stefano Ceccherini 8b7987023f Implemented needed methods to be able to clone the accelerant.
Implemented SetIndexedColors hook, although not really correct.
I don't know why the driver's 8 bit mode were disabled. They seem to 
work fine. I had to enable at least 640x480x8 to be able to test 
WindowScreen. There are some TODOs in the code. I'll look into them 
later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-14 14:41:45 +00:00
Ryan Leavengood b2a409507e Adding the header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-13 02:36:18 +00:00
Ryan Leavengood 5a1210fbef Moved the BAboutWindow implementation to the shared source directory, which
despite being talked about repeatedly, does not currently exist.

Adding this required adding some new Jam rules to deal with this shared source
directory and headers. I had some fun figuring this out. Despite writing
articles about Jam in the Haiku newsletter a few years ago I still find Jam to
be a PITA at times.

But my solution seems to work pretty well. Basically you just call the rule
UseSharedSource and pass the name of the shared source file you want to use.
This rule sets up the header directories and the right Jam variables for the
source file. You then add the source file to the source list in the Application
rule like any other source file.

I also made the authors list sent to the about window constructor null
terminated instead of passing the size of the array, as suggested by Hugo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 03:54:07 +00:00
Ryan Leavengood a8a83855b0 Initial implementation of the common BAboutWindow class. Of course I just
realized that calling it a window may not be strictly correct since it isn't a
decendent of BWindow, but just uses a BAlert. Oh well, it can be changed if
need be.

I'm also checking in the first use of it, in ShowImage. Since ShowImage can
still be compiled for R5 I've added a #ifdef around the new BAboutWindow
related code.

I'm open for suggestions for the interface for this class, well mostly the
constructor. I'm not a big fan of having to specify the number of authors.

For now I'm making the header private, but I don't think it would be a big deal
to expose it publically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-11 00:14:32 +00:00
Jérôme Duval 428d4d161b updated mesa to 6.5.3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:00:44 +00:00
Stefano Ceccherini 3616859a05 Changed the interaction between BMenuFrame, BMenuScroller and
BMenuWindow. BMenuScroller now is just the scroller button, and it's a 
child of BMenuWindow. This simplifies attaching/detaching the 
scrollers, and it's also a bit cleaner. 
The lower scroller wasn't shown anymore for some reason, and this commit also fixes this problem.
A drawing bug shows up now, though: when scrolling the menu UP, some 
spurious lines are drawn over the menu. I wonder if this is an 
app_server bug or what.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-05 10:20:06 +00:00
Axel Dörfler 7aced0c776 * The second open will now fail, too, in case the hardware could not be initialized
correctly.
* Got rid of this superfluous cookie stuff - either the VFS behaves correctly, or
  we're screwed anyway.
* Made adding debugger commands optional depending on if DEBUG_COMMANDS is defined
  or not.
* Minor other cleanup.  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-04 16:04:05 +00:00
Axel Dörfler 3bac9ea19a * Work in progress to support the i965 chipset as well; still works on i865, but
doesn't work on i965 yet.
* B_GET_DISPLAY_MODE now returns the mode actually configured in the chip instead
  of the last mode set; while this isn't really necessary, it allows to check what
  mode was used during startup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-04 15:32:01 +00:00
Axel Dörfler b2ed0e7acf Implemented "fail_safe_video_mode" boot option; if you're using it, the app_server
will not load any graphics driver (other than VESA).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-03 20:20:19 +00:00
Marcus Overhagen 9e448b6224 cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-02 23:16:54 +00:00
Marcus Overhagen 1d18292953 Moved creating and destroying of Reader and Decoder plugins into the PluginManager class.
Removed deferred initialization from BMediaDecoder. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-02 20:00:48 +00:00
Ingo Weinhold eedc15536c Added driver settings support to the FS shell.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-25 05:07:34 +00:00
Hugo Santos 77bf99deb0 fixed the way accept() works in regards to the cookie pointer. It is no longer visible to userspace, we pass the fd instead. Also renamed kernel's shutdown() to system_shutdown as it collides with Posix's shutdown().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 19:56:40 +00:00
Hugo Santos 969885b848 loop: no longer requires a reader thread, it delivers directly to the device's receive queue
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 07:56:15 +00:00
Hugo Santos a1deb55ef5 net_interface_private: added receive queue and splited device reading from packet processing. Delivering to self no longer is executed in the sender's context, which had some problems with TCP's locking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 07:55:54 +00:00
Hugo Santos d3d38faf41 net_buffer: prevent modules from messing with metadata too much
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 03:48:57 +00:00
Hugo Santos 79a0d25245 net_buffer: preparing for better metadata management
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 03:48:23 +00:00
Michael Pfeiffer a637368987 Clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-20 19:55:22 +00:00
Michael Pfeiffer e4ee835fc2 Fixed bug #1231. Update text rectangle when view is resized.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-20 19:48:33 +00:00
Ingo Weinhold bdf8a2e1e7 Added Haiku revision number to the kernel (same mechanism as used for
libroot). It's available in the kernel through the private
get_haiku_revision() and added to the kernel syslog output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-19 15:36:32 +00:00
Axel Dörfler 8ca5764554 * Implemented APM generic syscall API to query the current power status.
* PowerStatus is now using this API when compiled for Haiku.
* Note, I'm not sure why yet, but running PowerStatus in the background
  crashes at least my laptop after some time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-16 15:22:23 +00:00
Ithamar R. Adema b0d9cd6f66 * Delete all local copies of multi_audio from source tree.
* Change name of header for Haiku specific multi_audio to hmulti_audio (in line with the rename of the media addon itself)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-14 02:37:14 +00:00
Jérôme Duval 34bd8bf599 cleanup, fixed some warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-13 17:47:23 +00:00
Stefano Ceccherini 140334f858 Added error checking using exceptions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 08:46:56 +00:00
Axel Dörfler d00539e3ba * Revamped BPathMonitor API as suggested by Ingo - we could rename it to BNodeMonitor
and add wrappers for watch_node() as well, though.
* Implemented more or less all what is needed for the path monitoring to work.
* Added a test application: works fine under Haiku, but somewhat flaky under BeOS,
  dunno why yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-08 00:30:59 +00:00
Ingo Weinhold e23824d781 Surprising how much gcc 4 compilers on Linux differ. Another attempt to
make both gcc 2.95.3 and the plethora of gcc 4s happy: Typedefed
struct fssh_stat to fssh_struct_stat, thus hopefully avoiding spurious
errors concerning clashes with the function or regarding namespacing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-07 13:41:12 +00:00
Axel Dörfler f30198a051 * Implemented PathMonitor class - untested, but compiles.
* The API is just a proposal at this time, please comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-04 16:02:04 +00:00
Axel Dörfler a5667a5b8b * Renamed nv.driver to "nvidia", nm.driver to "neomagic", and mga.driver to "matrox";
also renamed their accelerants and settings files accordingly.
* Added Mandelbrot and GLDirectMode as demo applications.
* Moved CortexAddOnHost to /bin.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-04 07:49:53 +00:00
Axel Dörfler 8c40c83fa1 Renamed net_device::{add|rem}_multi() to {add|remove}_multicast for consistency and clarity.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-04 06:57:26 +00:00
Hugo Santos 6d043beb03 freebsd compat. layer: added mii placeholders, callout implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-03 21:18:21 +00:00
Stefano Ceccherini 4bfa8f22df completes previous commit. Sorry for breaking the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-03 16:34:31 +00:00
Ingo Weinhold 8dcb250c8a Thou shall not leave a blank line between copyright header and header
guard.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 14:26:29 +00:00
Hugo Santos f6cfc5af19 set ValueIterator's fIndex to the next slot so OpenHashTable's Iterator properly gets it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 14:08:55 +00:00
François Revol 8c5d3c422a Kernel socket helper funcs, with BONE compatibility. Shared by at laest 2 fs addons, and soon other drivers, so move it in here.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 00:31:45 +00:00
Hugo Santos 954038303d added add_multi/rem_multi to net_devices. Glued the interface protocol multicast handling with net_device via add_multi/rem_multi.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-01 12:26:03 +00:00
Hugo Santos 8465a06910 added a ValueIterator to MultiHashTable to present a limited view in result of Lookup()s.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-01 12:16:36 +00:00
Hugo Santos 8aa4c7e370 prepared the ipv4 multicast code for full multicast support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-01 11:38:59 +00:00
Hugo Santos 1a41adbcd2 added join_multicast/leave_multicast to datalink protocols, preparing for full multicast support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-01 11:38:39 +00:00
Hugo Santos 73f1548be1 some getsockopt/setsockopt and multicast fixes.
* allow an ipv4 bind() to a multicast address.
 * bumped getsockopt/setsockopt kernel driver buffers to 256 bytes to at least handle structures which take one sockaddr_storage.
 * convert generic multicast delta API names to IPv4 ones before handling the specific option.
 * changed ipv4_getsockopt/ipv4_setsockopt a bit as the code gcc 2.95 was generating was a bit too funky.
 * properly pass setsockopt/getsockopt to handling protocols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 19:42:12 +00:00
Ingo Weinhold a4d337d5dd Undefine macros defined under BeOS before redefining them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:11:04 +00:00
Hugo Santos 0e30c21c70 ipv4: changed the multicast filter to use an hash table to keep source states.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 12:31:31 +00:00
Jérôme Duval c25f230cb6 added _get_key_map() to get the character map size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 10:07:34 +00:00
Hugo Santos 698b6d7195 cache/slab: when CACHE_DURING_BOOT is specified, use vm_allocate_early to obtain pages for slabs, and create the associated areas on post bootup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 22:58:46 +00:00
Hugo Santos 39af445966 added object_cache_reserve to allow cache users to pre-allocate slabs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 21:45:23 +00:00
Hugo Santos 11debaf6e4 added CACHE_UNLOCKED_PAGES flag to allow caches' pages to be created with no locking instead of full locking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 20:55:44 +00:00
Hugo Santos cf5d9f4b8d added 'udp_endpoints' debugger command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 19:03:06 +00:00
Hugo Santos 0be6e97788 minimal cleanups
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 13:11:30 +00:00
Ingo Weinhold dac7faad8d Added volume initialization support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 07:22:22 +00:00
Hugo Santos 6bad493439 pushed the slab init a bit deeper. added a object cache based allocator, including a bootstrap mechanism to have it init during bootup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 02:23:37 +00:00
Ingo Weinhold 3b8715d804 Provide a way to convert FS shell error codes to host platform error
codes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-28 23:40:04 +00:00
Hugo Santos 6e31ae98f9 some object cache / slab improvements.
- call the reclaimer callback when low on memory.
 - use the depot when on multi-cpu setups (for scalability).
 - fixed the amount of memory spent on slabs for very large objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-28 21:35:23 +00:00
Hugo Santos 11b5020f2f rewrote the object cache (slab) implementation a bit, preparing for further integration.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-28 18:53:58 +00:00
Hugo Santos 8a96ba39e3 some slab cleanups, split the C interface to another file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-28 09:37:38 +00:00
Hugo Santos 4e8a1b331f miniature cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-28 09:37:26 +00:00
Ingo Weinhold 90c0876839 FS shell changes:
* Added basic built-in module support.
* Added rootfs.
* Added "kernel" initialization.
* Exposed the FS syscalls.
* Mounting/unmounting the FS works now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 22:37:01 +00:00
Hugo Santos 505e98538a introduced MultiHashTable, similiar to multimap, but with hash table semantics.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 15:06:30 +00:00
Hugo Santos 01a10fc527 fixed OpenHashTable::Iterator, it wasn't working for a single item.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 14:47:34 +00:00
Ingo Weinhold a38a92c955 Beginnings of a new, better portable FS shell with Haiku FS interface.
Doesn't do anything ATM, but already provides the required system
interface (VFS, caches, POSIX functions).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 12:17:22 +00:00
Hugo Santos 8ac2dba331 added iterator to OpenHashTable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 08:07:38 +00:00
Hugo Santos 5084c83901 addressed Axel's suggestion regarding SocketAddress' GetPort() name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 07:20:43 +00:00
Hugo Santos 25a2744f9e adapted UDP to use AddressUtilities, for readability.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 07:10:11 +00:00
Hugo Santos 4b55736dde added new helper ProtocolSocket. Moved some stuff together to achieve better inlining.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 07:09:46 +00:00
Marcus Overhagen 4b095722c7 new debug header for media kit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 20:40:27 +00:00
Marcus Overhagen a4c8b51d3a changed header guard
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 20:39:30 +00:00
Hugo Santos 5d6551d69f removed some of the slab's initial heavy debugging. we now merge the links into the slab itself resulting in zero overhead per buffer with MergedLink strategy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 15:40:53 +00:00
Hugo Santos e6fb3d3947 more slab fixes, also introduced a new strategy optimized for medium sized buffers (64 >= x < 512) with lengths other than power of 2 (has an overhead of 2 words per buffer).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 11:38:24 +00:00
Hugo Santos dd89ad0e7e added locking to slab's Cache<>. Now we react to system's low memory conditions freeing up empty slabs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 07:31:19 +00:00
Hugo Santos b8c0d6618e gcc 4 compilation fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 06:32:25 +00:00