haiku/headers/private/kernel
Pawel Dziepak b167307526 kernel: Properly synchronize suspending new thread
After load_image() the child thread is suspended and the parent is
expected to resume it later. However, it is possible that the parent
attempts to resume its child after it has been notified that the image
had been loaded but before the child managed to suspend itself. In such
case the child would suspends itself after that wake up attempt and,
consequently will not be ever resumed.

To mitigate that problem flag Thread::going_to_suspend has been added
which helps synchronizing thread suspension and continuation in a similar
way that "traditional" thread blocking is performed. This means that
the child should behave in a following manner: set its going_to_suspend flag,
notify the parent (i.e. any thread that may want to resume it), acquire
its scheduler_lock and suspend itself if the going_to_suspend flag is set.
The parent should follow pattern: clear going_to_suspend flag of the thread
that is about to be resumed, acquire that thread scheduler_lock and enqueue
it in a run queue if it is suspended.

Thanks Oliver for reporting the bug and identifying what causes it.
2014-03-17 02:40:12 +01:00
..
arch ARM: Name beagleboneblk back to beagle 2014-02-26 15:33:40 -06:00
boot kernel: Add missing smp memory barrier calls. Set max cpu to 1 2014-01-19 19:33:21 -06:00
disk_device_manager * Added file_system_module_info::uninitialize() analogously to 2011-06-13 01:53:11 +00:00
fs Style cleanup. 2012-10-08 13:59:16 +02:00
platform OF: Make sure the of_region templatized struct is packed 2012-11-06 16:34:01 +01:00
posix
slab Add new operator that takes an ObjectCache* and allocation flags and 2011-11-02 21:12:09 +00:00
util trim support code: The passed in MemoryDeleter was never used. 2014-01-22 22:23:31 +01:00
vm Merge branch 'scheduler' 2014-01-17 04:06:15 +01:00
AllocationTracking.h Move AllocationTrackingInfo into a header. This way it can be re-used outside 2011-11-04 18:03:34 +00:00
block_cache.h
boot_device.h
boot_item.h
boot_splash.h
commpage.h commpage: randomize position of commpage 2013-04-04 15:27:22 +02:00
condition_variable.h kernel: Remove gSchedulerLock 2013-11-08 02:41:26 +01:00
console.h
cpu.h kernel: fix missing SMP_MAX_CPUS on non-x86 2014-01-19 14:09:51 -06:00
debug_heap.h Add debug_calloc() to the debug_heap. 2012-07-01 06:37:25 +02:00
debug_hex_dump.h Add a hex dump utility for use in KDL commands 2013-11-25 12:45:36 +01:00
debug_paranoia.h
debug.h mmlr + bonefish: 2011-11-01 17:19:26 +00:00
debugger_keymaps.h Add missing pipe character in KDL keymap. 2014-01-27 10:57:11 +01:00
DPC.h kernel: DPC: remove schedulerLocked argument 2013-11-04 23:51:18 +01:00
elf_priv.h Support ELF64 in the kernel. 2012-07-09 11:11:38 +01:00
elf.h Implemented user debugging support for x86_64. 2012-08-07 20:20:42 +01:00
file_cache.h
frame_buffer_console.h
generic_syscall.h
heap.h Allow replacing the object cache with the guarded heap. 2011-12-04 13:52:06 +01:00
int.h x86[_64]: Support assigning MSI IRQs to arbitrary CPU 2013-12-20 01:07:08 +01:00
kdevice_manager.h
kdriver_settings.h
kernel_c++_structs.h
kernel_daemon.h
kernel.h Increased kernel stack size by another page for 64-bit 2013-11-04 18:53:49 +01:00
kimage.h
kmodule.h
kscheduler.h kernel: Remove cpu_info::load 2014-01-03 19:44:57 +01:00
ksignal.h commpage: randomize position of commpage 2013-04-04 15:27:22 +02:00
ksyscalls.h
ksystem_info.h kernel, libroot: Introduce new API for obtaining system info 2013-12-16 03:58:43 +01:00
listeners.h kernel: Remove gSchedulerLock 2013-11-08 02:41:26 +01:00
load_tracking.h kernel: Adjust load tracking interval 2014-02-06 03:23:28 +01:00
lock.h kernel/x86: Inline atomic functions and memory barriers 2014-01-06 09:08:53 +01:00
low_resource_manager.h
messaging.h
MessagingServiceDefs.h Remove remaining unnecessary 'volatile' qualifiers 2013-11-06 00:03:07 +01:00
Notifications.h Rework DefaultNotificationService registration. 2013-04-22 18:42:21 -04:00
port.h Reduce lock contention in kernel port subsystem. 2013-10-26 16:10:03 +02:00
real_time_clock.h
safemode.h kernel safemode: Add functions to get options early 2013-12-10 19:05:47 +01:00
scheduling_analysis.h
sem.h
smp.h kernel: Add CPUSet::{Clear, Set}BitAtomic() functions 2014-01-24 13:59:58 +01:00
syscall_restart.h trim: Added is_called_via_syscall() function. 2013-11-07 19:06:13 +01:00
system_profiler.h
team.h kernel: Remove gSchedulerLock 2013-11-08 02:41:26 +01:00
thread_types.h kernel: Properly synchronize suspending new thread 2014-03-17 02:40:12 +01:00
thread.h kernel: Properly synchronize suspending new thread 2014-03-17 02:40:12 +01:00
timer.h kernel: Remove B_TIMER_ACQUIRE_SCHEDULER_LOCK flag 2013-10-31 01:49:43 +01:00
tracing.h bonefish+mmlr: 2011-11-02 16:02:07 +00:00
user_atomic.h arm/atomic: round of atomic function changes 2014-02-15 11:46:12 +01:00
user_debugger.h Remove remaining unnecessary 'volatile' qualifiers 2013-11-06 00:03:07 +01:00
user_mutex.h
UserEvent.h kernel/UserEvent: Make sure UserEvent object is valid during DPC 2014-03-17 02:40:12 +01:00
usergroup.h
UserTimer.h kernel: Protect UserTimers with sUserTimerLock 2013-11-05 05:36:05 +01:00
vfs.h Merge branch 'master' into package-management 2013-05-05 15:03:26 +02:00
wait_for_objects.h Remove remaining unnecessary 'volatile' qualifiers 2013-11-06 00:03:07 +01:00