Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
project (ForeignUnhandledNative)

include_directories(${INC_PLATFORM_DIR})

set(SOURCES ForeignUnhandledNative.cpp)

if(NOT CLR_CMAKE_HOST_WIN32)
add_compile_options(-pthread)
endif()

# add the executable
add_library (ForeignUnhandledNative SHARED ${SOURCES})

# add the install targets
install (TARGETS ForeignUnhandledNative DESTINATION bin)
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

public delegate void MyCallback();

public class PInvokeRevPInvokeUnhandled
public class ForeignUnhandled
{
[DllImport("ForeignThreadRevPInvokeUnhandled")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this dllimport resolved before when the file and cmake used ForeignThreadRevPInvokeUnhandledNative

[DllImport("ForeignUnhandledNative")]
public static extern void InvokeCallbackOnNewThread(MyCallback callback);

[ThreadStatic]
Expand All @@ -30,7 +30,7 @@ private static void SetHandler()
}

// test-wide setup
static PInvokeRevPInvokeUnhandled()
static ForeignUnhandled()
{
AppDomain.CurrentDomain.UnhandledException += (_, _) =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="PInvokeRevPInvokeUnhandled.cs" />
<Compile Include="ForeignUnhandled.cs" />
</ItemGroup>
<ItemGroup>
<CMakeProjectReference Include="CMakeLists.txt" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
project (PInvokeUnhandledNative)

include_directories(${INC_PLATFORM_DIR})

set(SOURCES PInvokeUnhandledNative.cpp)

if(NOT CLR_CMAKE_HOST_WIN32)
add_compile_options(-pthread)
endif()

# add the executable
add_library (PInvokeUnhandledNative SHARED ${SOURCES})

# add the install targets
install (TARGETS PInvokeUnhandledNative DESTINATION bin)
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

public delegate void MyCallback();

public class PInvokeRevPInvokeUnhandled
public class PInvokeUnhandled
{
[DllImport("PInvokeRevPInvokeUnhandledNative")]
[DllImport("PInvokeUnhandledNative")]
public static extern void InvokeCallback(MyCallback callback);

[ThreadStatic]
Expand All @@ -30,7 +30,7 @@ private static void SetHandler()
}

// test-wide setup
static PInvokeRevPInvokeUnhandled()
static PInvokeUnhandled()
{
AppDomain.CurrentDomain.UnhandledException += (_, _) =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="ForeignThreadRevPInvokeUnhandled.cs" />
<Compile Include="PInvokeUnhandled.cs" />
</ItemGroup>
<ItemGroup>
<CMakeProjectReference Include="CMakeLists.txt" />
Expand Down

This file was deleted.

8 changes: 4 additions & 4 deletions src/tests/baseservices/exceptions/unhandled/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
project (foreignunhandled)
project (unhandlednative)

include_directories(${INC_PLATFORM_DIR})

set(SOURCES foreignunhandled.cpp)
set(SOURCES unhandlednative.cpp)

if(NOT CLR_CMAKE_HOST_WIN32)
add_compile_options(-pthread)
endif()

# add the executable
add_library (foreignunhandled SHARED ${SOURCES})
add_library (unhandlednative SHARED ${SOURCES})

# add the install targets
install (TARGETS foreignunhandled DESTINATION bin)
install (TARGETS unhandlednative DESTINATION bin)
2 changes: 1 addition & 1 deletion src/tests/baseservices/exceptions/unhandled/unhandled.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace TestUnhandledException

unsafe class Program
{
[DllImport("foreignunhandled")]
[DllImport("unhandlednative")]
public static extern void InvokeCallbackOnNewThread(delegate*unmanaged<void> callBack);

private const string INTERNAL_CALL = "__internal";
Expand Down
Loading