Commit Graph

2557 Commits

Author SHA1 Message Date
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