From: Marek Safar Date: Tue, 10 Sep 2019 09:08:00 +0000 (+0200) Subject: [netcore] Update System.Private.CoreLib public APIs X-Git-Tag: submit/tizen/20210909.063632~10331^2~5^2~534 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08911856e434c2e8338d402bc440dc7e39b3333a;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [netcore] Update System.Private.CoreLib public APIs Commit migrated from https://github.com/mono/mono/commit/96b7fead3377a0944bbb16dea309749bc995226e --- diff --git a/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs b/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs index 0ac47c9..98e4f2c 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs @@ -52,7 +52,7 @@ namespace System.Runtime.Loader } } - public static Assembly[] GetLoadedAssemblies () + internal static Assembly[] GetLoadedAssemblies () { return InternalGetLoadedAssemblies (); } diff --git a/src/mono/netcore/System.Private.CoreLib/src/System.Threading/Interlocked.cs b/src/mono/netcore/System.Private.CoreLib/src/System.Threading/Interlocked.cs index e19833b..fc0b8d4 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System.Threading/Interlocked.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System.Threading/Interlocked.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; namespace System.Threading { @@ -48,7 +49,8 @@ namespace System.Threading public extern static double CompareExchange (ref double location1, double value, double comparand); [MethodImplAttribute(MethodImplOptions.InternalCall)] - public extern static T CompareExchange (ref T location1, T value, T comparand) where T : class; + [return: NotNullIfNotNull("location1")] + public extern static T CompareExchange (ref T location1, T value, T comparand) where T : class?; [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static long Exchange (ref long location1, long value); @@ -60,7 +62,8 @@ namespace System.Threading public extern static double Exchange (ref double location1, double value); [MethodImplAttribute(MethodImplOptions.InternalCall)] - public extern static T Exchange (ref T location1, T value) where T : class; + [return: NotNullIfNotNull("location1")] + public extern static T Exchange (ref T location1, T value) where T : class?; [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static long Read (ref long location);