Commit Graph

21063 Commits

Author SHA1 Message Date
Ingo Weinhold
bf96bbafd8 Include <sys/uio.h> to fix gcc 4 warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 18:42:13 +00:00
Stefano Ceccherini
ecef598e73 Added a window creation speed test. Can test empty windows or windows
with BBoxes within.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 14:10:40 +00:00
Axel Dörfler
079c69cbfd Added daemon() function to libbsd.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 12:32:20 +00:00
Ryan Leavengood
f303cd6cc2 Applied patch from "HOST", with a few small style fixes myself.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 03:08:40 +00:00
François Revol
af73a9fb93 Add reading of .url files from win, redirects to default browser.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 01:26:42 +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
Jérôme Duval
c4ec032d19 ooops it was le32toh
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 20:59:02 +00:00
Ingo Weinhold
eadeecc2ff Updated TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 20:35:27 +00:00
Jérôme Duval
9b17641496 missing le32toh()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 19:52:44 +00:00
Jérôme Duval
a44ef21361 added fwcontrol, fw_raw and firewire. This could break someone's build :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 18:44:57 +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
Axel Dörfler
d8badf6791 * Renamed page queues according to our style guide.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 15:35:09 +00:00
Axel Dörfler
b50494aaac * file_cache_set_size() now calls file_cache_invalidate_file_map() with the
correct values (resolving a TODO); however, the latter doesn't do anything
  with those yet.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 12:42:53 +00:00
Ingo Weinhold
bc5f008afb Added "breakpoint", "watchpoint", "breakpoints", and "watchpoints"
kernel debugger commands, which can set/clear/list in-kernel break- and
watchpoints. Only available when KERNEL_BREAKPOINTS is defined. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 00:32:30 +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
Axel Dörfler
8a3cfa2cf3 * Made menu windows behave differently than others: before, they were just
always put between window screens and modal all windows (before floating
  all ones), so a BWindowScreen couldn't have menus at all.
  Now, they behave more like floating app windows, just that they float above
  all other application windows, such that all window feels (also BWindowScreen)
  can now have menus.
* Reenabled keyboard redirection to the top most window in case it's a menu;
  bug #1152 no longer applies due to the above change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 12:16:28 +00:00
Axel Dörfler
4c751e51c8 Added a test application to investigate how BeOS deals with keyboard input
in menus - the application will crash as soon as you open the "Crash" sub
menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 12:02:57 +00:00
Marcus Overhagen
23c7bf9da2 enable interrupts
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 20:49:07 +00:00
Marcus Overhagen
25f926d8e4 forward scsi request to the ports
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 20:26:07 +00:00
Marcus Overhagen
4f733fe93b added Interrupt handling framework
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 19:54:45 +00:00
Marcus Overhagen
3d41648479 implemented controller reset and AHCI enable, init a port object for each implemented device port
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 18:51:57 +00:00
Marcus Overhagen
9815383e54 a class for the SATA ports
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 18:51:03 +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
Marcus Overhagen
105f622310 print proper values for zero-based numbers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 16:52:46 +00:00
Ingo Weinhold
e5c9c9e371 Also print the expected value. Some comment on what should happen.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 15:16:45 +00:00
Stefano Ceccherini
b33a19a278 Adjusted a bit BTextView::AutoResize() so that the text rect is more
centered. At least renaming a file in tracker looks a bit better now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:51:51 +00:00
Ingo Weinhold
538abf58b3 Added test case for the r/o text segment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:42:59 +00:00
Marcus Overhagen
093a713df2 map registers and print some information
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:29:10 +00:00
Marcus Overhagen
1a941c2e04 added more definitions from specification
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:28:47 +00:00
Stephan Aßmus
2c5a88945e fix more glitches:
* invalidate the correct rect on WindowActivated() in case fDivider is not
  correclty maintained
* don't cut off part of the label in Draw() by constraining the clipping in
  case the placement of the label is a little different than intented


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 13:33:51 +00:00
Stephan Aßmus
a431f44be8 * make the text view layouting more robust, draw the frame around the
text view, ignore the divider for this (application code could layout
  the textview itself, and fDivider might not be maintained)
* change Draw() and TextInput::MakeFocus() accordingly

this fixes the weird placement of text controls in Beam


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 12:51:59 +00:00
Marcus Overhagen
06c88385e8 copied
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 12:40:39 +00:00
Ingo Weinhold
1d1b0d065b Made ProcessController's "Debug Thread" feature work under Haiku. We
don't have a "db" command (we could probably add a small shell script
that invokes gdb in a Terminal), but just as BeOS we have
debug_thread(), which does exactly that -- throwing a thread into the
debugger. It (at least Haiku's version, not sure about BeOS's) also
interrupts system calls, which makes the semaphore releasing hack
superfluous.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 00:31:19 +00:00
Jérôme Duval
0735851ca7 readme for firewire from JiSheng
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-31 18:21:34 +00:00
Axel Dörfler
22e95c5911 * creating (or dividing) reserved areas did not acquire a ref to an address
space - but they were released upon deletion. It's probably not really
  needed, but now all reserved areas also grab a reference to their address
  space.
* Rearranged team tear down to be a bit more sane: the I/O context is removed
  first (where semaphores/areas/ports/whatever might still be used), and the
  address space is deleted last.
* delete_area() can now remove its address space reference again (due to the
  two changes above), and therefore fixes bug #1374.
* cleaned up vm_address_space.c a bit (no functional change there, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-31 14:20:28 +00:00
Stefano Ceccherini
e94ad1e24d If typing is hidden, don't reply to B_COPY or B_CUT messages, but beep()
in this case. Note that the public methods still let you copy and cut 
the real text. Also prevented stealing passwords via scripting (not 
tested, though). Fixes bug #1354
Got rid of the _BTextGapBuffer_::[] operator since using it creates less readable code.
Also Implemented _BTextGapBuffer_::RealText() and used it instead of Text() inside BTextView. Will make sense later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-31 07:39:18 +00:00
Stephan Aßmus
553024440b This fixes all the issues mentioned in #1207
* improved alignment of controls
* removed last separator from icon bar
* moved separator in sending mode so grouping of trash icon is like in
  reading mode
* adjust window size constraints according to icon bar width
* fixed follow modes of menufields when resizing window (even on BeOS,
  though a custom menu field is needed to take care of invalidation)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 23:10:41 +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
Stephan Aßmus
caacab3726 * small cleanup, added comment about out of memory condition
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 22:31:55 +00:00
Jérôme Duval
afa1b9a59c added fwcontrol and firewire to the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 22:02:34 +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
68f2081497 Little test for set_area_protection()'s B_READ_AREA -> B_WRITE_AREA behavior.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 20:39:53 +00:00
Stephan Aßmus
7ebe0d01cf first part of a big cleanup of the Mail code
* separated window, app and context menu code
* got rid of all the global variables (which were accessed completely without
  locking, and the code with regards to the preference window sill needs
  fixing)
* extracted some defines and helper functions to MailSupport.cpp, though I later
  saw Utilities.cpp...
* got rid of the FONT_SIZE define which was used in some (but not all) controls
  to override the system font size
* worked in Header.cpp to get the controls layout font sensitive with correct
  alignment too, some problems remain when resizing the window


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 19:32:38 +00:00
Ingo Weinhold
74c17141dc arch_debug_get_caller() was returning the return address of the wrong
stack frame (i.e. its own). Not sure what the comment is supposed to
mean. Tested with gcc 2 and 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 02:27:06 +00:00
Ingo Weinhold
e7555d345c Also interrupt condition variables in _user_debug_thread().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 02:22:52 +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
c0d613f845 Obsolete variable was still checked, which led to source directories
being copied onto the image even when updating only and alwaysUpdate
unspecified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 01:03:36 +00:00
Axel Dörfler
7bc5a06be6 * BShelf::_AddReplicant() did not recognize zombies if their object was not
inherited from BView.
* BShelf::_AddReplicant() did not honour the fAllowZombies flag correctly; if
  it wasn't allowed, no error message was given.
* Both of these changes fixes the crashing of the Deskbar as described in
  bug #555.
* instantiate_object() now also fires a message to the syslog if the object's
  image could not been loaded. Some cleanup, no longer resets errno.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 01:03:33 +00:00