break;
case STATE_OUT:
if (InterlockedCompareExchange (&nodes [i].state, STATE_BUSY, STATE_OUT) == STATE_OUT) {
- result = mono_lls_find (&lls, hp, i, HAZARD_FREE_SAFE_CTX);
+ result = mono_lls_find (&lls, hp, i);
assert (!result);
mono_hazard_pointer_clear_all (hp, -1);
- result = mono_lls_insert (&lls, hp, &nodes [i].node, HAZARD_FREE_SAFE_CTX);
+ result = mono_lls_insert (&lls, hp, &nodes [i].node);
mono_hazard_pointer_clear_all (hp, -1);
assert (nodes [i].state == STATE_BUSY);
break;
case STATE_IN:
if (InterlockedCompareExchange (&nodes [i].state, STATE_BUSY, STATE_IN) == STATE_IN) {
- result = mono_lls_find (&lls, hp, i, HAZARD_FREE_SAFE_CTX);
+ result = mono_lls_find (&lls, hp, i);
assert (result);
assert (mono_hazard_pointer_get_val (hp, 1) == &nodes [i].node);
mono_hazard_pointer_clear_all (hp, -1);
- result = mono_lls_remove (&lls, hp, &nodes [i].node, HAZARD_FREE_SAFE_CTX);
+ result = mono_lls_remove (&lls, hp, &nodes [i].node);
mono_hazard_pointer_clear_all (hp, -1);
++thread_data->num_removes;
main (int argc, char *argv [])
{
int primes [] = { 1, 2, 3, 5, 7, 11, 13, 17 };
- MonoThreadInfoCallbacks thread_callbacks;
thread_data_t thread_data [NUM_THREADS];
int i;
- memset (&thread_callbacks, 0, sizeof (thread_callbacks));
-
mono_metadata_init ();
- mono_threads_init (&thread_callbacks, 0);
+ mono_thread_info_init (0);
- mono_lls_init (&lls, free_node, HAZARD_FREE_NO_LOCK);
+ mono_lls_init (&lls, free_node);
for (i = 0; i < N; ++i) {
nodes [i].node.key = i;