Skip to content

Commit 2dd71f7

Browse files
committed
Let's see what breaks
1 parent 3990791 commit 2dd71f7

File tree

9 files changed

+1083
-15
lines changed

9 files changed

+1083
-15
lines changed

build-tools/create-packs/Microsoft.Android.Runtime.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ projects that use the Microsoft.Android framework in .NET 6+.
4848
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libxa-lz4.a" />
4949
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libxa-shared-bits.a" />
5050
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.release-static.a" />
51+
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libpinvoke-override-dynamic.a" />
5152
<FrameworkListFileClass Include="@(_AndroidRuntimePackAssemblies->'%(Filename)%(Extension)')" Profile="Android" />
5253
<FrameworkListFileClass Include="@(_AndroidRuntimePackAssets->'%(Filename)%(Extension)')" Profile="Android" />
5354
</ItemGroup>

src/native/monodroid/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ macro(lib_target_options TARGET_NAME)
185185
${SHARED_LIB_NAME}
186186
xa::runtime-base
187187
xa::java-interop
188+
xa::pinvoke-override-precompiled
188189
xa::lz4
189190
-lmonosgen-2.0
190191
-llog

src/native/monodroid/internal-pinvokes.cc

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,23 @@ monodroid_get_log_categories ()
1515
int
1616
monodroid_get_system_property (const char *name, char **value)
1717
{
18+
<<<<<<< HEAD
1819
return AndroidSystem::monodroid_get_system_property (name, value);
20+
=======
21+
return AndroidSystem::monodroid_get_system_property (name, value);
22+
>>>>>>> 13ba4b152 (Let's see what breaks)
1923
}
2024
2125
int
2226
monodroid_embedded_assemblies_set_assemblies_prefix (const char *prefix)
2327
{
28+
<<<<<<< HEAD
2429
embeddedAssemblies.set_assemblies_prefix (prefix);
2530
return 0;
31+
=======
32+
embeddedAssemblies.set_assemblies_prefix (prefix);
33+
return 0;
34+
>>>>>>> 13ba4b152 (Let's see what breaks)
2635
}
2736

2837
void
@@ -62,13 +71,21 @@ monodroid_log (LogLevel level, LogCategories category, const char *message)
6271
void
6372
monodroid_free (void *ptr)
6473
{
74+
<<<<<<< HEAD
6575
free (ptr);
76+
=======
77+
free (ptr);
78+
>>>>>>> 13ba4b152 (Let's see what breaks)
6679
}
6780
6881
int
6982
_monodroid_max_gref_get ()
7083
{
84+
<<<<<<< HEAD
7185
return static_cast<int>(AndroidSystem::get_max_gref_count ());
86+
=======
87+
return static_cast<int>(AndroidSystem::get_max_gref_count ());
88+
>>>>>>> 13ba4b152 (Let's see what breaks)
7289
}
7390

7491
int
@@ -81,19 +98,31 @@ _monodroid_gref_get ()
8198
void
8299
_monodroid_gref_log (const char *message)
83100
{
101+
<<<<<<< HEAD
84102
osBridge._monodroid_gref_log (message);
103+
=======
104+
osBridge._monodroid_gref_log (message);
105+
>>>>>>> 13ba4b152 (Let's see what breaks)
85106
}
86107
87108
int
88109
_monodroid_gref_log_new (jobject curHandle, char curType, jobject newHandle, char newType, const char *threadName, int threadId, const char *from, int from_writable)
89110
{
111+
<<<<<<< HEAD
90112
return osBridge._monodroid_gref_log_new (curHandle, curType, newHandle, newType, threadName, threadId, from, from_writable);
113+
=======
114+
return osBridge._monodroid_gref_log_new (curHandle, curType, newHandle, newType, threadName, threadId, from, from_writable);
115+
>>>>>>> 13ba4b152 (Let's see what breaks)
91116
}
92117

93118
void
94119
_monodroid_gref_log_delete (jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
95120
{
121+
<<<<<<< HEAD
96122
osBridge._monodroid_gref_log_delete (handle, type, threadName, threadId, from, from_writable);
123+
=======
124+
osBridge._monodroid_gref_log_delete (handle, type, threadName, threadId, from, from_writable);
125+
>>>>>>> 13ba4b152 (Let's see what breaks)
97126
}
98127
99128
int
@@ -105,50 +134,83 @@ _monodroid_weak_gref_get ()
105134
void
106135
_monodroid_weak_gref_new (jobject curHandle, char curType, jobject newHandle, char newType, const char *threadName, int threadId, const char *from, int from_writable)
107136
{
137+
<<<<<<< HEAD
108138
osBridge._monodroid_weak_gref_new (curHandle, curType, newHandle, newType, threadName, threadId, from, from_writable);
139+
=======
140+
osBridge._monodroid_weak_gref_new (curHandle, curType, newHandle, newType, threadName, threadId, from, from_writable);
141+
>>>>>>> 13ba4b152 (Let's see what breaks)
109142
}
110143

111144
void
112145
_monodroid_weak_gref_delete (jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
113146
{
147+
<<<<<<< HEAD
114148
osBridge._monodroid_weak_gref_delete (handle, type, threadName, threadId, from, from_writable);
149+
=======
150+
osBridge._monodroid_weak_gref_delete (handle, type, threadName, threadId, from, from_writable);
151+
>>>>>>> 13ba4b152 (Let's see what breaks)
115152
}
116153
117154
void
118155
_monodroid_lref_log_new (int lrefc, jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
119156
{
157+
<<<<<<< HEAD
120158
osBridge._monodroid_lref_log_new (lrefc, handle, type, threadName, threadId, from, from_writable);
159+
=======
160+
osBridge._monodroid_lref_log_new (lrefc, handle, type, threadName, threadId, from, from_writable);
161+
>>>>>>> 13ba4b152 (Let's see what breaks)
121162
}
122163

123164
void
124165
_monodroid_lref_log_delete (int lrefc, jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
125166
{
167+
<<<<<<< HEAD
126168
osBridge._monodroid_lref_log_delete (lrefc, handle, type, threadName, threadId, from, from_writable);
169+
=======
170+
osBridge._monodroid_lref_log_delete (lrefc, handle, type, threadName, threadId, from, from_writable);
171+
>>>>>>> 13ba4b152 (Let's see what breaks)
127172
}
128173
129174
void
130175
_monodroid_gc_wait_for_bridge_processing ()
131176
{
177+
<<<<<<< HEAD
132178
mono_gc_wait_for_bridge_processing ();
179+
=======
180+
mono_gc_wait_for_bridge_processing ();
181+
>>>>>>> 13ba4b152 (Let's see what breaks)
133182
}
134183

135184
int
136185
_monodroid_get_android_api_level ()
137186
{
187+
<<<<<<< HEAD
138188
return monodroidRuntime.get_android_api_level ();
189+
=======
190+
return monodroidRuntime.get_android_api_level ();
191+
>>>>>>> 13ba4b152 (Let's see what breaks)
139192
}
140193
141194
void
142195
monodroid_clear_gdb_wait ()
143196
{
197+
<<<<<<< HEAD
144198
monodroidRuntime.set_monodroid_gdb_wait (false);
199+
=======
200+
monodroidRuntime.set_monodroid_gdb_wait (false);
201+
>>>>>>> 13ba4b152 (Let's see what breaks)
145202
}
146203

147204
void*
148205
_monodroid_get_identity_hash_code (JNIEnv *env, void *v)
149206
{
207+
<<<<<<< HEAD
150208
intptr_t rv = env->CallStaticIntMethod (monodroidRuntime.get_java_class_System (), monodroidRuntime.get_java_class_method_System_identityHashCode (), v);
151209
return (void*) rv;
210+
=======
211+
intptr_t rv = env->CallStaticIntMethod (monodroidRuntime.get_java_class_System (), monodroidRuntime.get_java_class_method_System_identityHashCode (), v);
212+
return (void*) rv;
213+
>>>>>>> 13ba4b152 (Let's see what breaks)
152214
}
153215
154216
void*
@@ -306,7 +368,11 @@ monodroid_dylib_mono_free ([[maybe_unused]] void *mono_imports)
306368
https://github.com/dotnet/java-interop/blob/master/src/java-interop/java-interop-gc-bridge-mono.c#L266
307369
308370
it should also accept libmono_path = nullptr parameter
371+
<<<<<<< HEAD
309372
*/
373+
=======
374+
*/
375+
>>>>>>> 13ba4b152 (Let's see what breaks)
310376
int
311377
monodroid_dylib_mono_init (void *mono_imports, [[maybe_unused]] const char *libmono_path)
312378
{

src/native/pinvoke-override/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ macro(create_library _libname _alias _sources)
3535

3636
add_library(${_alias} ALIAS ${_libname})
3737

38+
<<<<<<< HEAD
3839
set_static_library_suffix(${_libname})
3940

41+
=======
42+
>>>>>>> 13ba4b152 (Let's see what breaks)
4043
target_compile_definitions(
4144
${_libname}
4245
PRIVATE

src/native/pinvoke-override/common.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
using namespace xamarin::android;
44

55
PinvokeOverride::pinvoke_library_map PinvokeOverride::other_pinvoke_map (PinvokeOverride::LIBRARY_MAP_INITIAL_BUCKET_COUNT);
6+
<<<<<<< HEAD
67
xamarin::android::mutex PinvokeOverride::pinvoke_map_write_lock;
8+
=======
9+
std::mutex PinvokeOverride::pinvoke_map_write_lock;
10+
>>>>>>> 13ba4b152 (Let's see what breaks)

src/native/pinvoke-override/pinvoke-override-api.hh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,21 @@ namespace xamarin::android {
7878
static void* monodroid_pinvoke_override (const char *library_name, const char *entrypoint_name);
7979

8080
private:
81+
<<<<<<< HEAD
8182
static xamarin::android::mutex pinvoke_map_write_lock;
83+
=======
84+
static std::mutex pinvoke_map_write_lock;
85+
>>>>>>> 13ba4b152 (Let's see what breaks)
8286
static pinvoke_library_map other_pinvoke_map;
8387
8488
#if defined(PRECOMPILED)
8589
static inline void *system_native_library_handle = nullptr;
8690
static inline void *system_security_cryptography_native_android_library_handle = nullptr;
8791
static inline void *system_io_compression_native_library_handle = nullptr;
92+
<<<<<<< HEAD
8893
static inline void *system_globalization_native_library_handle = nullptr;
94+
=======
95+
>>>>>>> 13ba4b152 (Let's see what breaks)
8996
#endif
9097
};
9198
}

0 commit comments

Comments
 (0)