<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>4384c96f - [lldb/linux] Handle main thread exits</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/lldb/test/API/functionalities/thread/main_thread_exit/Makefile#4384c96f</link>
        <description>[lldb/linux] Handle main thread exitsThis patch handles the situation where the main thread exits (throughthe SYS_exit syscall). In this case, the process as a whole continuesrunning until all of the other threads exit, or one of them issues anexit_group syscall.The patch consists of two changes:- a moderate redesign of the handling of thread exit (WIFEXITED) events.  Previously, we were removing (forgetting) a thread once we received  the WIFEXITED (or WIFSIGNALED) event. This was problematic for the  main thread, since the main thread WIFEXITED event (which is better thought  of as a process-wide event) gets reported only after the entire process  exits. This resulted in deadlocks, where we were waiting for the  process to stop (because we still considered the main thread &quot;live&quot;).  This patch changes the logic such that the main thread is removed as  soon as its PTRACE_EVENT_EXIT (the pre-exit) event is received. At  this point we can consider the thread gone (for most purposes). As a  corrolary, I needed to add special logic to catch process-wide exit  events in the cases where we don&apos;t have the main thread around.- The second part of the patch is the removal of the assumptions that  the main thread is always available. This generally meant replacing  the uses of GetThreadByID(process_id) with GetCurrentThread() in  various process-wide operations (such as memory reads).Differential Revision: https://reviews.llvm.org/D122716

            List of files:
            /llvm-project-15.0.7/lldb/test/API/functionalities/thread/main_thread_exit/Makefile</description>
        <pubDate>Wed, 30 Mar 2022 09:40:34 +0000</pubDate>
        <dc:creator>Pavel Labath &lt;pavel@labath.sk&gt;</dc:creator>
    </item>
</channel>
</rss>
