Commit Graph

21030 Commits

Author SHA1 Message Date
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
Ingo Weinhold 9774b66a7d Fixed incorrect check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 00:57:12 +00:00
Axel Dörfler a632458d8e The wonders of signals:
* Since the app_server launched the input_server, it would also get notified
  when the latter died via a signal - but LinkReceiver could return B_INTERRUPTED
  in that case (it didn't check the return value of port_buffer_size()) which
  the app_server misinterpreted and quit itself... this fixes the hanging part
  of bug #1298.
* But the input_server still wasn't restarted, because the Registrar had it
  still listed as being running. Now, the Registrar checks not just periodically
  for died teams, it will also check for it when a new application registers
  itself. This fixes the rest of bug #1298.
* Removed the old (disabled) R5 style input_server launch mechanism from the
  app_server.
* MessageLooper now prints a bit more information when a port is supposed to
  have been deleted.
* The default implementation of MessageLooper::_GetLooperName() is now
  returning the name of the semaphore of its BLocker instead of "unnamed
  looper".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 00:09:43 +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
Ingo Weinhold e44a5286c4 The Compare() methods were broken. Worst of all Compare(x, x) would
return 1, which caused STL sort() to access elements out of bounds.
Fixes bug #1422.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 23:06:00 +00:00
Jérôme Duval 0ec9f6f4a0 added dpc to the image
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 19:36:43 +00:00
Axel Dörfler def5fadafc Added Mail's spell checker files to the image, thus closing bug #1221.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 19:31:32 +00:00
Axel Dörfler 451cbc4a94 * SudokuSolver::ComputeSolutions() can now be called more than once without
doubling the solution list.
* ComputeSolutions() will now check if solving the Sudoku is affordable for
  this algorithm (at least 1/6th of the fields must be known). This fixes
  one part of bug #1435.
* SudokuView now checks if the Sudoku is already solved before trying to
  fill in a value from the solution (and then it did not find a free spot,
  surprisingly). This fixes the other part of bug #1435.
* SudokuView now beeps if there was no solution.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 13:24:31 +00:00
François Revol 60e8637484 Should help building in zeta.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 12:37:12 +00:00
François Revol 8cfb4e2c76 Add opensound media node to the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 12:33:41 +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 de6be214a0 OpenSound System media node, current version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 12:28:49 +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
Axel Dörfler c4a589b09a There is no reason the printers directory shouldn't have the folder icon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 10:22:54 +00:00
Ingo Weinhold c9f8015628 Fixed DEBUB build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 01:04:25 +00:00
Axel Dörfler 22ca66b9f8 Fixed bug #1028 from both sides:
* FindPanel::SetUpAddRemoveButtons() called Window()->FindView() but did not
  check if Window() was NULL.
* BWindow now always checks the result of a BAutolock - this is why Tracker
  got away with this bug on BeOS; NULL windows cannot be locked...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-29 00:40:40 +00:00
Ingo Weinhold 1273dcaaae Respect SA_NOCLDSTOP.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 21:34:05 +00:00
Ingo Weinhold dbc03773ef Added a SIGCHLD handler, so that the terminal will notice when one of
its shells has been terminated. Usually the thread reading from the tty
master would notice when all slaves have been closed, but they won't be
closed when the shell started a background job that's still living.

Unfortunately there are race conditions in the terminal that can lead to
deadlock when a session is closed. The service threads usually happily
lock the window, while the (locked) window would wait for the service
threads to quit.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 21:19:15 +00:00
Marcus Overhagen 036a8857a6 added a workaround to prevent loading the driver multiple times for the same device
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 21:10:39 +00:00
François Revol 11902c74d8 Fix warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 17:37:15 +00:00
Stefano Ceccherini 6a9c969bcc If line breaks have changed, don't take the startOffset into account. Fixes bug #1430
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 15:13:55 +00:00
Ingo Weinhold f8ae4fe2c2 Added TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 14:28:22 +00:00
Ingo Weinhold e8b3ee8155 SIGCHLD also needs to be sent when a child is stopped. The shell now
properly realized when a job has been stopped.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 14:24:34 +00:00
Ingo Weinhold d348ab947f mksignames is not at all cross-compilation-friendly, since it includes
the host platform's <signal.h> to build the signal name array from. We
use a hand-edited signames.h when cross-compiling for Haiku, now.
The shell does now show the correct signal names when having been
compiled under Linux. Moreover we avoid bug #1428 (mksignames being
broken under FreeBSD).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 12:07:49 +00:00
Ingo Weinhold 10206d89d5 We need to use kprintf() in the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 03:34:44 +00:00
Ingo Weinhold 63fa790e9b fVariable was not correctly unset when the condition variable entry was
removed from the variable, which could lead to crashes under certain
cicrumstances.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 03:34:06 +00:00
Ingo Weinhold a7ba350ff2 Missed this one: Completed waitpid().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 03:31:30 +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
Marcus Overhagen 5461952df6 improved debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-27 22:02:28 +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
Axel Dörfler 4f6fa362cf * Fixed driver initialization - you are supposed to call init_driver()
and uninit_driver() yourself. We're also using this to let the controller
  access the pci_device object.
* Fixed some style violations for your pleasure ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-27 09:36:35 +00:00