Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit a76d0bd

Browse files
committed
extern(D) for scanWindowsOnly
1 parent 6f2e6bc commit a76d0bd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/core/thread/osthread.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ version (Solaris)
14011401

14021402

14031403
version (Windows)
1404-
private extern (C) void scanWindowsOnly(scope ScanAllThreadsTypeFn scan, ThreadBase _t) nothrow
1404+
private extern (D) void scanWindowsOnly(scope ScanAllThreadsTypeFn scan, ThreadBase _t) nothrow
14051405
{
14061406
auto t = _t.toThread;
14071407

src/core/thread/threadbase.d

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,13 @@ private void scanAllTypeImpl(scope ScanAllThreadsTypeFn scan, void* curStackTop)
11061106
}
11071107
}
11081108

1109-
private extern (C) void scanWindowsOnly(scope ScanAllThreadsTypeFn scan, ThreadBase) nothrow;
1109+
version (Windows)
1110+
{
1111+
// Currently scanWindowsOnly can't be handled properly by externDFunc
1112+
// https://github.com/dlang/druntime/pull/3135#issuecomment-643673218
1113+
pragma(mangle, "_D4core6thread8osthread15scanWindowsOnlyFNbMDFNbEQBvQBt10threadbase8ScanTypePvQcZvCQDdQDbQBi10ThreadBaseZv")
1114+
private extern (D) void scanWindowsOnly(scope ScanAllThreadsTypeFn scan, ThreadBase) nothrow;
1115+
}
11101116

11111117
/**
11121118
* The main entry point for garbage collection. The supplied delegate

0 commit comments

Comments
 (0)