Merge pull request #913 from Daniel15/fix-catchall-routing-master
[mono.git] / mono / metadata / mono-cq.c
index 3ab5bf6ffe571be8b63f84b1a93b07d7a7a410ad..c2bf26db944e5cc12f7f2d8d00108ab38ec16514 100644 (file)
@@ -82,7 +82,7 @@ mono_cq_destroy (MonoCQ *cq)
        if (!cq)
                return;
 
-       mono_gc_bzero (cq, sizeof (MonoCQ));
+       mono_gc_bzero_aligned (cq, sizeof (MonoCQ));
        MONO_GC_UNREGISTER_ROOT (cq->tail);
        MONO_GC_UNREGISTER_ROOT (cq->head);
        g_free (cq);
@@ -132,9 +132,9 @@ mono_cqitem_try_enqueue (MonoCQ *cq, MonoObject *obj)
                }
 
                if (InterlockedCompareExchange (&queue->last, pos + 1, pos) == pos) {
-                       mono_array_setref (queue->array, pos, obj);
+                       mono_array_setref_fast (queue->array, pos, obj);
                        STORE_STORE_FENCE;
-                       mono_array_set (queue->array_state, char, pos, TRUE);
+                       mono_array_set_fast (queue->array_state, char, pos, TRUE);
                        if ((pos + 1) == CQ_ARRAY_SIZE) {
                                CQ_DEBUG ("enqueue(): pos + 1 == CQ_ARRAY_SIZE, %d. Adding node.", CQ_ARRAY_SIZE);
                                mono_cq_add_node (cq);