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
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
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
(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
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
* 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
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
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
* 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
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
Also check for negative positions smaller -1
(as -1 means using current address).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22031 a95241bf-73f2-0310-859d-f6bbb57e9c96
but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22022 a95241bf-73f2-0310-859d-f6bbb57e9c96
* 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
* get_signal_stack() checked the wrong sig_action field (index is signal-1), also,
it had an off-by-one error in the stack range check.
* factored out a restart_syscall() function to avoid code duplication
* arch_setup_signal_frame() relied on the fact that vregs and the signal stack code
is a multiple of 4 bytes in size.
* Fixed sigaction(): it did return the error code directly instead of setting errno.
* signal() actually had a work-around for the broken sigaction()...
* Replaced the sig_func_t typedef with a sighandler_t typedef - this is non-standard
anyway, but now we're at least compatible with the GNU world instead of introducing
our own solution (BSD seems to use sig_t here, BTW).
* Removed now unused sigval structure from the header; it should be added again as
soon as we start supporting it.
* SA_RESETHAND and SA_ONESHOT are the same thing; the former did not work before.
* Made the non-standard SA_* flags refer to the standard ones instead of the other
way around.
* Added a test application for various signal features - works fine under Haiku,
tested also under Linux and BeOS (the latter fails as it does not support SA_RESTART).
More tests should be added, though.
* Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21999 a95241bf-73f2-0310-859d-f6bbb57e9c96
* 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
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
compliant:
* it now checks the alignment is a multiple of 4 (needs to be changed for 64 bit architectures)
* it no longer sets errno.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21975 a95241bf-73f2-0310-859d-f6bbb57e9c96
sense. Instead, we now lock its app_server connection only. The deadlock as exposed
by starting Icon-O-Matic twice is now gone, at last.
* Fixed the TODO added by Ingo in r21953: moved the thread/handler renaming code in a
dedicated method _SetName() which is now called from _InitData() and SetTitle(); the
"w>" is no longer lost.
* Unlike the BeBook states, BMessageQueue::RemoveMessage() is indeed not supposed to
delete the message it removes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21959 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
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
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
* 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
BView implementation (client side)
* introduced some private methods for _Convert*(BPoint*) methods which avoid
doing the check_lock() thing in the recursion, also Origin() would likely
have communicated with the app_server all the time, since the origin bit
was needlessly invalidated, so some speedup should be achieved
* this should fix ticket #98
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21900 a95241bf-73f2-0310-859d-f6bbb57e9c96
* 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