git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v13 0/2] win32: close handles of threads that have been joined

From
RGRose via GitGitGadget <gitgitgadget@gmail.com>
Date
Jan 3, 2023, 16:20 UTC
Message-ID
<pull.1406.v13.git.git.1672762819.gitgitgadget@gmail.com>
In-Reply-To
<pull.1406.v12.git.git.1671932405.gitgitgadget@gmail.com>

After joining threads, the handle to the original thread should be closed as it no longer needs to be open.

Signed-off-by: Seija Kijin doremylover123@gmail.com
Seija Kijin (2):
  win32: prepare pthread.c for change by formatting
  win32: close handles of threads that have been joined
 compat/win32/pthread.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
base-commit: 2b4f5a4e4bb102ac8d967cea653ed753b608193c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1406%2FAtariDreams%2Fjoin-v13
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1406/AtariDreams/join-v13
Pull-Request: https://github.com/git/git/pull/1406
Range-diff vs v12:
 1:  e0cc43efc6c ! 1:  6f89b120641 win32-pthread: prepare pthread.c for change by formatting
     @@ Metadata
      Author: Seija Kijin <doremylover123@gmail.com>
      
       ## Commit message ##
     -    win32-pthread: prepare pthread.c for change by formatting
     +    win32: prepare pthread.c for change by formatting
      
     -    File has been formatted to meet coding guidelines
     +    File has been formatted to meet coding guidelines.
      
          Signed-off-by: Seija Kijin <doremylover123@gmail.com>
      
     @@ compat/win32/pthread.c: static unsigned __stdcall win32_start_routine(void *arg)
       
       	if (!thread->handle)
       		return errno;
     -@@ compat/win32/pthread.c: int pthread_create(pthread_t *thread, const void *unused,
     - 
     - int win32_pthread_join(pthread_t *thread, void **value_ptr)
     +@@ compat/win32/pthread.c: int win32_pthread_join(pthread_t *thread, void **value_ptr)
       {
     --	DWORD result = WaitForSingleObject(thread->handle, INFINITE);
     --	switch (result) {
     + 	DWORD result = WaitForSingleObject(thread->handle, INFINITE);
     + 	switch (result) {
      -		case WAIT_OBJECT_0:
      -			if (value_ptr)
      -				*value_ptr = thread->arg;
     @@ compat/win32/pthread.c: int pthread_create(pthread_t *thread, const void *unused
      -			return EINVAL;
      -		default:
      -			return err_win_to_posix(GetLastError());
     -+	switch (WaitForSingleObject(thread->handle, INFINITE)) {
      +	case WAIT_OBJECT_0:
      +		if (value_ptr)
      +			*value_ptr = thread->arg;
 2:  fa5cbfa5e0c = 2:  f126d6416d5 win32: close handles of threads that have been joined
-- 
gitgitgadget
Previous: Junio C HamanoNext: Seija Kijin via GitGitGadget
Message 35 of 41 in “win32: close handles of threads that have been joined”
  1. win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 19, 2022
  2. Ævar Arnfjörð BjarmasonDec 19, 2022
  3. Johannes SixtDec 20, 2022
  4. win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 20, 2022
  5. win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 20, 2022
  6. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 20, 2022
  7. 1/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Dec 20, 2022
  8. 2/2 prepSeija Kijin via GitGitGadget, Dec 20, 2022
  9. win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 20, 2022
  10. Johannes SixtDec 20, 2022
  11. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 21, 2022
  12. 1/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Dec 21, 2022
  13. 2/2 prepSeija Kijin via GitGitGadget, Dec 21, 2022
  14. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 21, 2022
  15. 2/2 prepSeija Kijin via GitGitGadget, Dec 21, 2022
  16. 1/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Dec 21, 2022
  17. Johannes SixtDec 22, 2022
  18. win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 22, 2022
  19. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 22, 2022
  20. 2/2 prep: reformat pthread.c to fit coding guidelinesSeija Kijin via GitGitGadget, Dec 22, 2022
  21. Junio C HamanoDec 23, 2022
  22. 1/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Dec 22, 2022
  23. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 23, 2022
  24. 1/2 win32-pthread: prepare pthread.c for change by formattingSeija Kijin via GitGitGadget, Dec 23, 2022
  25. 2/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Dec 23, 2022
  26. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 23, 2022
  27. 1/2 win32-pthread: prepare pthread.c for change by formattingSeija Kijin via GitGitGadget, Dec 23, 2022
  28. 2/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Dec 23, 2022
  29. René ScharfeDec 24, 2022
  30. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Dec 25, 2022
  31. 2/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Dec 25, 2022
  32. Junio C HamanoDec 26, 2022
  33. 1/2 win32-pthread: prepare pthread.c for change by formattingSeija Kijin via GitGitGadget, Dec 25, 2022
  34. Junio C HamanoDec 26, 2022
  35. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Jan 3, 2023
  36. 1/2 win32: prepare pthread.c for change by formattingSeija Kijin via GitGitGadget, Jan 3, 2023
  37. 2/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Jan 3, 2023
  38. 0/2 win32: close handles of threads that have been joinedRose via GitGitGadget, Jan 5, 2023
  39. 1/2 win32: prepare pthread.c for change by formattingSeija Kijin via GitGitGadget, Jan 5, 2023
  40. 2/2 win32: close handles of threads that have been joinedSeija Kijin via GitGitGadget, Jan 5, 2023
  41. Junio C HamanoJan 6, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.