015 Thread exit Start

Source: Internet
Author: User

thread exits start
when a process is destroyed
0Destroying temporary objects
0Release Stack
0set the return value to my exit code
0reduce the number of process kernel objects used
when a thread is destroyed
0destroying temporary objects call my destructors
0frees the current thread inside the lock allocation stack, Windows-HOOK
0Set the return value to the return value of the entry function of my exit code thread to my exit code
0reduce the number of process kernel objects used
ExitThread immediately ends the current thread
TerminateThread can end other threads

Exit
0destroys the stack that belongs to the current thread
0But he's not going to call destructors.
0can easily cause memory leaks

Thread Start
0kernel object Structure Body
0 usage Count
0ExitCode
0Signaled current whether this object is able to accept the signal status
0CONTEXT context Current state of the CPU
0 State IP (instruction) SP (stack register) with CPU registers stored
0The thread goes into the process and applies a piece of memory as my stack for the front thread.
0lParam
Entry functions for 0lpStartAddress threads
0 if it is to do reverse deterioration above two parameter identification

015 Thread exit Start

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.