Commit Graph

20989 Commits

Author SHA1 Message Date
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
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
Jérôme Duval
61b50eed27 fix gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 21:34:43 +00:00
Marcus Overhagen
fc002ebb35 print PCI vendor and device ID
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 21:26:16 +00:00
Marcus Overhagen
e63ca93e6a compile fix for gcc 2.95
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 21:19:52 +00:00
Jérôme Duval
183bd9f434 black on black isn't easy to read : it's better to switch to the default color
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 20:54:48 +00:00
Marcus Overhagen
83a2d4db1a make sure the request failes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 20:53:35 +00:00
Marcus Overhagen
48a55608e6 added a completely broken way to get the pci_device
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 20:45:59 +00:00
Ingo Weinhold
ebe6d10684 Turned the files I intend to devastate to C++.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 20:37:54 +00:00
Marcus Overhagen
9f8f7442f3 pci_device can't be made static, it identifies the individual controller PCI device
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 20:28:30 +00:00
Marcus Overhagen
a53e060c17 set scsi target id maximum to 33 (32 devices + controller) for ahci controller
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 19:59:12 +00:00
Marcus Overhagen
402a4a4e7b Set scsi target id limit to 16, was previously hardcoded to 2. Add a node attribute to allow overriding this value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 19:57:51 +00:00
Marcus Overhagen
ddf188703a Moved PCI access code, but the compiler refuses to convert 'device_node_info*' to 'pci_device_info*' in argument passing...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 19:19:57 +00:00
Marcus Overhagen
21255d1fc7 moved controller specific functionality into it's own class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 19:06:14 +00:00
Marcus Overhagen
2210148f94 compile the sim as C++
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:57:31 +00:00
Marcus Overhagen
c42a837e85 scsi_sim_cookie is just another name for void *
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:55:45 +00:00
Marcus Overhagen
64ceb67ba3 even more debugging
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:49:53 +00:00
Ingo Weinhold
0c770dc39e Changed the suspend character to Ctrl-Z.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:11:13 +00:00
Ingo Weinhold
b637ab846f * Send SIGTTIN/SIGTTOU when a background process tries to read
from/write to a tty.
* Send SIGTSTP when the suspend character is typed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:10:21 +00:00
Marcus Overhagen
8eca44fa7e added more debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 16:04:10 +00:00
Axel Dörfler
7bd1d755c4 Applied patch by Fredrik Ekdahl to fix the compilation with GCC 4 - thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 15:31:52 +00:00
Ingo Weinhold
1f9b6e48c3 Enabled job control. It doesn't fully work yet, as there's some kernel
support missing, but it cures the symptoms of bug #113.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 15:16:55 +00:00
Stephan Aßmus
e749c485ed * this fixes the second part of #1426, unfortunately, the clipping checks
have become more expensive, so maybe it is better to do what I proposed
  in the ticket comments, and move the rounding of drawing command coordinates
  into ViewLayer::ConvertToTopForDrawing() instead of handling it in
  DrawingEngine and Painter


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 14:31:49 +00:00
Stephan Aßmus
561844529d * implement FillRect() with B_OP_INVERT using hardware acceleration like
FillRegion() is already doing (untested)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 14:23:06 +00:00
Stephan Aßmus
53fca955e6 * I confirmed that on BeOS, BView::Invalidate(BRect) rounds the rect to integer
coords in this way. BRegion does a different rounding, also compatible
  with BeOS. I added an explaination. This fixes one _part_ of #1426, which is
  that Sudoku doesn't invalidate more area than intended (or at least it works
  as it does on BeOS now). The second part of the bug though is that the server
  has been preventing the drawing of lines and rects in a certain way, in another
  words, the part of the bug I fixed should not have been a problem in the first
  place if the clipping would have worked correctly. I believe the problem shows
  when the drawing commands contain fractional offsets. The rounding happens in
  the server, but maybe too late (after comparing with the clipping region). It
  could also be a bug in our BRegion implementation, I need to check my new
  implementation behaves exactly like BeOS in the Intersects() and Contains()
  methods for fractional coordinates parameters. Anyways, at least the visual
  problems are gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 12:58:20 +00:00
Michael Lotz
b7a5b10ad1 Synced with r22047 of main version. Thanks Jerome for noticing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 08:47:33 +00:00
Axel Dörfler
d578543aa6 * Added a first game to the image: Sudoku. It comes with a solver and generator
for three different levels (from "Very Easy" to "Hard"). Have fun!
* Feel free to do a nicer icon!
* Stack.h is actually verbatim copy of a kernel header which we might want
  to move to a more public place (like shared).
* ProgressWindow is taken from ShowImage, but adapted to suit different
  needs.
* It seems to trigger a bug in the interface kit or app_server: when moving
  the mouse around, the right border of a field is sometimes lost. This
  does not happen in BeOS, and there is actually no code that looks responsible
  for this - it might be an off by one error in the region code, though?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-25 17:39:46 +00:00
Stephan Aßmus
227fb2b11c * use Ryan's new BAboutWindow class (also removed the hint that this app
originally was a birthday present for Ingo... hope he is Ok with that)
* fixed ticket #1424, now it uses three empty buttons for new pads
* cloned pads are now opened at an offset, otherwise one wouldn't have any
  visual feedback that something happened with a cloned pad on top of the
  original


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-25 17:34:43 +00:00
Michael Pfeiffer
86519fe39d Moved my name from Team Leads to Developers list.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-25 07:16:52 +00:00
Ingo Weinhold
212659504c Missing include.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-24 23:07:32 +00:00
Ingo Weinhold
68da24992b Small test tool printing process/process group and singal info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-24 22:18:01 +00:00
Ingo Weinhold
90e8d7253b Don't include Haiku's POSIX headers for host platform builds. Big no-no.
Bash builds for BeOS R5 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-24 21:07:24 +00:00
Ingo Weinhold
61ca8e04bb * Added a common directory for missing system on BeOS systems.
* Added the old fella <stdint.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-24 21:05:20 +00:00
Ryan Leavengood
6eb0129659 Patch from Justin O'Dell for bug #254, fixing the Defaults button behavior
for the Appearance and Menu prefs, and Tracker's settings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-24 01:17:18 +00:00
Axel Dörfler
8be13cd585 * SCSI SIM module driver shell for the AHCI driver for Marcus.
It is loaded on boot, and the SCSI bus manager tries to scan its bus which
  of course fails at the moment. Hope that helps :-)
* Moved the driver to its new location; it's a SCSI bus controller, so it
  should be placed in busses/scsi.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-23 23:29:08 +00:00
Michael Lotz
d570f3bf79 * Don't leak buffers when reallocs fail
* Always check the return of the resize function
* Handle resize errors gracefully and ensure that the message stays intact
* Don't crash when printing a message that contains a field with no items (unlikely but possible in low memory situations)
* Fixed renaming fields - was completely broken and would have missed up field names and contents
* Some cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-23 21:17:44 +00:00
Ingo Weinhold
0385b0657b Patch by Samuel Rodriguez Perez, slightly modified by myself: New
configure flag "--use-32bit" enabling 32 bit builds with a 64 bit host
compiler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 22:07:03 +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
40056ffaaf Removed CURON/CUROFF constants. Use a boolean instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 20:29:40 +00:00
Axel Dörfler
3460c2c4eb * Fixes to let the device manager try to use the driver:
- module name didn't have the "/device_v1" suffix (which is used to
    differentiate device modules, as they can be everywhere in the path).
  - ahci_get_supported_paths() now tells the device manager that it
    exports a PCI disk device.
* Moved ahci out of the "scsi" sub-directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 18:44:38 +00:00
Stephan Aßmus
5c34aef797 changed the meaning of the "icon view label background" Tracker setting:
* it is replaced by a "icon view label outline" feature that renders a black
  or white outline around the text of a label under an icon. This can be used
  for background images that have a lot of contrast and is visually more
  pleasing (IMHO) than the text box in the workspace color (but the outline
  could of course still be improved as well)
  the outline or "false bold width" feature is a new BFont feature in Haiku
* Tracker appeared to have a disabled feature to install default background
  images, I enabled this feature and rewrote it a bit to use our big logo
  from the artwork folder, the placement is for 800x600, so not optimal for
  larger desktops, but at least it is shown by default on new installations
  or rather "fresh" images
* changed the way the dotted underline is rendered under links, accidentally,
  this fixes the bug that it was not dotted at all since a while, which is
  a bug in app_server or BView not tracking the need to update the drawing
  pattern in certain situations (this bug needs to be fixed too of course)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 15:01:38 +00:00