Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@@ -1080,7 +1080,9 @@ namespace System.Threading
/// <typeparam name="T">The kind of elements contained within.</typeparam>
internal class SparselyPopulatedArray<T> where T : class
{
#if DEBUG
private readonly SparselyPopulatedArrayFragment<T> m_head;
#endif
private volatile SparselyPopulatedArrayFragment<T> m_tail;
/// <summary>
@@ -1089,7 +1091,10 @@ namespace System.Threading
/// <param name="initialSize">How many array slots to pre-allocate.</param>
internal SparselyPopulatedArray(int initialSize)
{
m_head = m_tail = new SparselyPopulatedArrayFragment<T>(initialSize);
#if DEBUG
m_head =
#endif
m_tail = new SparselyPopulatedArrayFragment<T>(initialSize);
}
#if DEBUG

View File

@@ -1 +1 @@
4168909f0dd17449e19e6aed3039bce3e82ce073
21ec1d7b8346d780a4a059738ca4bb8f908e7f5c

View File

@@ -1 +1 @@
2b64b423d8e28a317807644569681db96f0c3521
89ae7f7d20e98d27c2f40234107dd5d469f715c5

View File

@@ -412,7 +412,9 @@ namespace System.Threading.Tasks
/// </summary>
internal class ParallelLoopStateFlags
{
#pragma warning disable 649
internal static int PLS_NONE;
#pragma warning restore
internal static int PLS_EXCEPTIONAL = 1;
internal static int PLS_BROKEN = 2;
internal static int PLS_STOPPED = 4;
@@ -439,7 +441,9 @@ namespace System.Threading.Tasks
{
oldState = m_LoopStateFlags;
if ((oldState & illegalStates) != 0) return false;
#pragma warning disable 420
if (Interlocked.CompareExchange(ref m_LoopStateFlags, oldState | newState, oldState) == oldState)
#pragma warning restore
{
return true;
}

View File

@@ -550,7 +550,9 @@ namespace System.Threading.Tasks
/// <summary>The action to invoke.</summary>
protected readonly Action m_action;
#if !MONO
protected int m_continuationId;
#endif
/// <summary>Initializes the continuation.</summary>
/// <param name="action">The action to invoke. Must not be null.</param>

View File

@@ -122,8 +122,9 @@ namespace System.Threading
throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong",name));
}
Contract.EndContractBlock();
Win32Native.SECURITY_ATTRIBUTES secAttrs = null;
#if !MONO
Win32Native.SECURITY_ATTRIBUTES secAttrs = null;
#if FEATURE_MACL
// For ACL's, get the security descriptor from the EventWaitHandleSecurity.
if (eventSecurity != null) {

View File

@@ -579,7 +579,9 @@ namespace System.Threading
// The head and tail of the queue. We enqueue to the head, and dequeue from the tail.
internal volatile QueueSegment queueHead;
internal volatile QueueSegment queueTail;
#if !MONO
internal bool loggingEnabled;
#endif
internal static SparseArray<WorkStealingQueue> allThreadQueues = new SparseArray<WorkStealingQueue>(16); //