History

win32: define arm64 Interlocked helpers in winnt.h

Move the TinyCC/Windows ARM64 Interlocked workaround from the semlock call site into the bundled WinAPI header. This keeps tcc.h using the normal Interlocked API while avoiding unresolved Interlocked imports when tcc -run self-compiles on Windows ARM64. Update lib/bt-exe.c as well so its ARM64 runtime object does not define a second InterlockedExchange fallback now provided by winnt.h.

Mounir IDRASSI committed 5 months ago

Commit 3b1fe971 parent 904e95c7 files · +122 −47Browse files

Showing the changes to lib (1 of 7 files). Show all

Unified · Split

lib/bt-exe.c+0−10
@@ -85,13 +85,3 @@ ST_FUNC char *pstrcpy(char *buf, size_t buf_size, const char *s) · 84 unmodified lines
8585 buf[l] = 0;
8686 return buf;
8787 }
88−
89−#if defined(_WIN64) && defined(__aarch64__)
90−/* The bt-only Windows ARM64 build should not rely on importing this helper. */
91−LONG InterlockedExchange(LONG volatile *Target, LONG Value)
92−{
93− LONG Old = *Target;
94− *Target = Value;
95− return Old;
96−}
97−#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t