Skip to content
Snippets Groups Projects
Commit 609878b9 authored by Alexandru BRĂSLAŞU's avatar Alexandru BRĂSLAŞU
Browse files

Tema

parent 277c59dc
No related branches found
No related tags found
No related merge requests found
Pipeline #44279 passed
......@@ -42,13 +42,9 @@ static void process_node(unsigned int idx)
pthread_mutex_unlock(&tp->mutexSuma);
graph->visited[idx] = DONE;
for (unsigned int i = 0; i < graph->nodes[idx]->num_neighbours; ++i) {
pthread_mutex_lock(&tp->mutexCoada);
int node = graph->visited[graph->nodes[idx]->neighbours[i]];
pthread_mutex_unlock(&tp->mutexCoada);
if (node == NOT_VISITED) {
pthread_mutex_lock(&tp->mutexCoada);
graph->visited[graph->nodes[idx]->neighbours[i]] = PROCESSING;
pthread_mutex_unlock(&tp->mutexCoada);
os_arg_t *arg = malloc(sizeof(*arg));
arg->x = graph->nodes[idx]->neighbours[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment