<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat/win32/pthread.h, branch seen</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=seen</id>
<link rel='self' href='https://git.shady.money/git/atom?h=seen'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-04-15T15:44:32Z</updated>
<entry>
<title>compat/win32: add pthread_cond_timedwait</title>
<updated>2026-04-15T15:44:32Z</updated>
<author>
<name>Paul Tarjan</name>
<email>github@paulisageek.com</email>
</author>
<published>2026-04-15T13:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8372c88f583b8910f1e57c00c89c0afcca7018dc'/>
<id>urn:sha1:8372c88f583b8910f1e57c00c89c0afcca7018dc</id>
<content type='text'>
Add a pthread_cond_timedwait() implementation to the Windows pthread
compatibility layer using SleepConditionVariableCS() with a millisecond
timeout computed from the absolute deadline.

Signed-off-by: Paul Tarjan &lt;github@paulisageek.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'gf/win32-pthread-cond-init'</title>
<updated>2025-12-16T02:08:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-12-16T02:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72154ce4147e971b59e10d79648b114481703607'/>
<id>urn:sha1:72154ce4147e971b59e10d79648b114481703607</id>
<content type='text'>
Emulation code clean-up.

* gf/win32-pthread-cond-init:
  win32: pthread_cond_init should return a value
</content>
</entry>
<entry>
<title>win32: pthread_cond_init should return a value</title>
<updated>2025-11-20T22:46:05Z</updated>
<author>
<name>Greg Funni</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2025-11-20T21:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=42aa7603aa752850c8ad89cca61e280dab520faf'/>
<id>urn:sha1:42aa7603aa752850c8ad89cca61e280dab520faf</id>
<content type='text'>
This value is not checked, but it must return to match POSIX

Signed-off-by: Greg Funni &lt;gfunni234@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: return error if SleepConditionVariableCS fails</title>
<updated>2025-11-20T22:45:26Z</updated>
<author>
<name>Greg Funni</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2025-11-18T15:41:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2367c6bcd600882d0ea70d4f654c8cfa5c1f53ac'/>
<id>urn:sha1:2367c6bcd600882d0ea70d4f654c8cfa5c1f53ac</id>
<content type='text'>
If it fails, return an error.

Signed-off-by: Greg Funni &lt;gfunni234@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>compat: mark unused parameters in win32/mingw functions</title>
<updated>2024-08-28T16:51:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2024-08-28T04:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b652382d761607c76258e2e91fa753dffe5c21dc'/>
<id>urn:sha1:b652382d761607c76258e2e91fa753dffe5c21dc</id>
<content type='text'>
The compat/ directory contains many stub functions, wrappers, and so on
that have to conform to a specific interface, but don't necessarily need
to use all of their parameters. Let's mark them to avoid complaints from
-Wunused-parameter.

This was done mostly via guess-and-check with the Windows build in
GitHub CI. I also confirmed that the win+VS build is similarly happy.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: use _endthreadex to terminate threads, not ExitThread</title>
<updated>2022-12-25T07:34:03Z</updated>
<author>
<name>Seija Kijin</name>
<email>doremylover123@gmail.com</email>
</author>
<published>2022-12-25T01:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0006e2e3f1de6a3a5351da298ee52b5d936addfd'/>
<id>urn:sha1:0006e2e3f1de6a3a5351da298ee52b5d936addfd</id>
<content type='text'>
Because we use the C runtime and
use _beginthreadex to create pthreads,
pthread_exit MUST use _endthreadex.

Otherwise, according to Microsoft:
"Failure to do so results in small
memory leaks when the thread
calls ExitThread."

Simply put, this is not the same as ExitThread.

Signed-off-by: Seija Kijin &lt;doremylover123@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pthread.h: manually align parameter lists</title>
<updated>2019-10-11T05:59:35Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-10-10T19:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9cad1c4488d598c62f2b33876d784c0706c4250a'/>
<id>urn:sha1:9cad1c4488d598c62f2b33876d784c0706c4250a</id>
<content type='text'>
In previous patches, extern was mechanically removed from function
declarations without care to formatting, causing parameter lists to be
misaligned. Manually format changed sections such that the parameter
lists are realigned.

Viewing this patch with 'git diff -w' should produce no output.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>compat/*.[ch]: remove extern from function declarations using spatch</title>
<updated>2019-09-05T18:05:45Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-09-04T11:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7027f508c767f57d9e8d5edeacf99d13950f6b69'/>
<id>urn:sha1:7027f508c767f57d9e8d5edeacf99d13950f6b69</id>
<content type='text'>
In 554544276a (*.[ch]: remove extern from function declarations using
spatch, 2019-04-29), we removed externs from function declarations using
spatch but we intentionally excluded files under compat/ since some are
directly copied from an upstream and we should avoid churning them so
that manually merging future updates will be simpler.

In the last commit, we determined the files which taken from an upstream
so we can exclude them and run spatch on the remainder.

This was the Coccinelle patch used:

	@@
	type T;
	identifier f;
	@@
	- extern
	  T f(...);

and it was run with:

	$ git ls-files compat/\*\*.{c,h} |
		xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place
	$ git checkout -- \
		compat/regex/ \
		compat/inet_ntop.c \
		compat/inet_pton.c \
		compat/nedmalloc/ \
		compat/obstack.{c,h} \
		compat/poll/

Coccinelle has some trouble dealing with `__attribute__` and varargs so
we ran the following to ensure that no remaining changes were left
behind:

	$ git ls-files compat/\*\*.{c,h} |
		xargs sed -i'' -e 's/^\(\s*\)extern \([^(]*([^*]\)/\1\2/'
	$ git checkout -- \
		compat/regex/ \
		compat/inet_ntop.c \
		compat/inet_pton.c \
		compat/nedmalloc/ \
		compat/obstack.{c,h} \
		compat/poll/

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: replace pthread_cond_*() with much simpler code</title>
<updated>2018-11-14T06:14:22Z</updated>
<author>
<name>Loo Rong Jie</name>
<email>loorongjie@gmail.com</email>
</author>
<published>2018-11-13T18:52:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c73b7ad5481647545020bcfabb0fe679792b20db'/>
<id>urn:sha1:c73b7ad5481647545020bcfabb0fe679792b20db</id>
<content type='text'>
The Win32 CONDITION_VARIABLE has better performance and is easier to
maintain, as the code is a lot shorter now (the semantics of the
CONDITION_VARIABLE matches the pthread_cond_t very well).

Note: CONDITION_VARIABLE is not available in Windows XP and below,
but the declared minimal Windows version required to build and run
Git for Windows is Windows Vista (which is also beyond its
end-of-life, but for less long than Windows XP), so that's okay.

Signed-off-by: Loo Rong Jie &lt;loorongjie@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/push-client-deadlock-fix'</title>
<updated>2016-05-18T22:11:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-18T22:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b153d2ae9206f752dd383c7bc30a5ab246ee5bcc'/>
<id>urn:sha1:b153d2ae9206f752dd383c7bc30a5ab246ee5bcc</id>
<content type='text'>
Some Windows SDK lacks pthread_sigmask() implementation and fails
to compile the recently updated "git push" codepath that uses it.

* jk/push-client-deadlock-fix:
  Windows: only add a no-op pthread_sigmask() when needed
  Windows: add pthread_sigmask() that does nothing
</content>
</entry>
</feed>
