Skip to content
Snippets Groups Projects
Commit 66109803 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'setspecific-cleanup' into 'master'

Remove thread specific seed code.

See merge request !1647
parents ede26e38 01ae0991
Branches
Tags
5 merge requests!1715Update planetary strength after planetary plus's master rebase,!1693More threapool plotting tweaks,!1668before Mag.Egy in all the flavors,!1662Initial sync from previous months,!1647Remove thread specific seed code.
......@@ -135,8 +135,7 @@ void *runner_main(void *data) {
struct runner *r = (struct runner *)data;
struct engine *e = r->e;
struct scheduler *sched = &e->sched;
unsigned int seed = r->id;
pthread_setspecific(sched->local_seed_pointer, &seed);
/* Main loop. */
while (1) {
......
......@@ -2948,7 +2948,6 @@ void scheduler_init(struct scheduler *s, struct space *space, int nr_tasks,
s->size = 0;
s->tasks = NULL;
s->tasks_ind = NULL;
pthread_key_create(&s->local_seed_pointer, NULL);
scheduler_reset(s, nr_tasks);
}
......
......@@ -106,9 +106,6 @@ struct scheduler {
* MPI. */
size_t mpi_message_limit;
/* 'Pointer' to the seed for the random number generator */
pthread_key_t local_seed_pointer;
/* Total ticks spent running the tasks */
ticks total_ticks;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment