haiku/headers/private
Niels Sascha Reedijk 331889d067 Kernel/Threads: remove limit on number of dead threads in a team
When a thread is created, it is expected that some other thread (usually the
creating thread) will want to make sure it completes. This is done using the
pthread_join() or wait_for_thread() calls.

It is possible that threads end before another thread waits for its completion.
That's why there is a dead thread list for each team, which holds thread ids
and their exit status so that a call to pthread_join() or wait_for_thread() in
the future can complete succesfully.

The dead thread list was limited to 32 threads per team. If there would be
more, the oldest thread would be kicked off. This could cause issues in
situations where a team would create more than 32 threads, and would start
waiting for their result after they have finished. Some of the calls would fail
because the threads would no longer be in the dead list.

This specifically caused problems for cargo (the Rust package manager), which
could depending on the number of dependencies, could create more than 32
threads. See: https://github.com/nielx/rust/issues/3

This change removes the limit of dead threads within a team. Note that there is
a risk that a badly written program that does not detach or joins its threads
can make this an endless list, but the impact is relatively small (dead threads
only occupy a bit of kernel memory).

Change-Id: I0135dd54e10ee48a529f23228d21237d4f1a74e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3178
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-09-01 21:04:46 +00:00
..
app RosterPrivate: add IsShutDownInProgress() 2019-12-21 20:32:31 +00:00
audio audio: Move hmulti_audio driver API to private audio headers 2018-10-23 16:33:19 +02:00
binary_compatibility BControl: Add icon support 2013-12-22 02:48:25 +01:00
bluetooth bluetooth: remove DEBUG definition. 2016-06-05 18:55:44 +02:00
debug
debugger Add (void*) casts to memcpy/memset invocations to appease GCC 8. 2019-05-24 14:21:37 -04:00
device acpi_battery: support for _BIX method. 2020-03-10 13:14:09 +00:00
drivers smbios: add module to match SMBios vendor and product 2020-04-27 07:38:40 +00:00
file_systems fs_shell: Prevent inclusion of BSD headers; fix DeviceOpener. 2020-05-10 12:44:46 -04:00
firewire Minor tweaks to fix the build after the last commit. 2019-03-26 20:06:09 -04:00
fs_shell block_cache: Change signature of *_etc() functions 2020-06-20 18:10:03 +00:00
graphics radeon_hd: Cram in a bunch of new PCIID's 2020-07-06 06:39:11 +00:00
i2c i2c: add acquire_bus/release_bus hooks 2020-04-12 16:55:52 +00:00
index_server
input Integrate PadBlocker in input preferences 2020-06-22 15:08:48 +00:00
interface BPicture: add fill rule support 2020-07-12 19:44:43 +00:00
kernel Kernel/Threads: remove limit on number of dead threads in a team 2020-09-01 21:04:46 +00:00
libroot Prepare for ICU update 2020-08-02 11:58:14 +02:00
locale locale kit: allow creating a catalog without entry_ref 2020-09-01 18:14:57 +00:00
mail build: Cleanup of libgnuregex usage. 2018-03-07 18:04:31 -05:00
media Fix clang warning "mismatched-tags" 2020-03-23 01:30:23 +00:00
midi Midi: Remove some duplicated code 2015-08-27 11:51:57 +02:00
mount
net Fix clang warning "mismatched-tags" 2020-03-23 01:30:23 +00:00
notification Notification_Server: Added ability to choose position of notifications 2017-12-24 12:02:38 +01:00
package kit/package: Error on short file read 2019-08-05 15:07:24 +00:00
preferences Fix glitch in Screen prefs when changing background color. 2017-04-30 10:29:39 +02:00
print PictureIterator.h: fix header guard spelling 2016-07-10 17:11:20 +02:00
runtime_loader libroot: make API version available. 2019-09-13 13:38:08 +00:00
screen_saver ScreenSaver: Rename BuildScreenSaverDefaultSettingsView 2016-04-13 15:50:30 -07:00
shared AutoDeleter: add operator [] for ArrayDeleter 2020-06-09 08:10:42 +00:00
storage Speed up BResource loading 2020-06-01 14:09:54 +00:00
support Add ZstdCompressionAlgorithm. 2017-11-24 21:35:49 +01:00
syslog_daemon syslog_daemon: Converted to BServer. 2015-07-22 20:40:47 +02:00
system Cleanup: Various comment and whitespace fixes. 2020-08-01 19:23:27 +00:00
textencoding
tracker Tracker FindPanel: Make a copy of fDeviceIcon 2016-07-31 19:42:39 -07:00
usb_vision
userlandfs Relicense all of Ingo's BSD/MIT+advertising clause'd code as plain MIT. 2019-08-30 18:27:35 -04:00
virtio virtio: add clear_feature hook. 2020-03-21 17:16:45 +00:00
vmdk
wmi wmi: add ACPI WMI implementation 2020-04-20 14:56:59 +00:00