|
Message
From: john.hall at annapmicro.com<john.hall@a...>
Date: Mon Jul 18 20:44:15 CEST 2005
Subject: [openrisc] or1ksim seg fault
I added the following 4 lines to fix my seg fault problem... somehow I suspect scheduler.free_job_queue was never supposed to point to NULL but I don't understand the scheduler very well and my programming skills are somewhat rusty these days.
John
diff -upr --unidirectional-new-file or1ksim/support/sched.h or1ksim_fixed/support/sched.h --- or1ksim/support/sched.h 2005-07-05 15:51:13.000000000 -0400 +++ or1ksim_fixed/support/sched.h 2005-07-18 13:49:32.000000000 -0400 @@ -89,6 +89,10 @@ static inline void sched_add(void (*job_ } new_job = scheduler.free_job_queue; + if (!new_job) { + new_job = malloc(sizeof(struct sched_entry)); + new_job->next = NULL; + } scheduler.free_job_queue = new_job->next; new_job->next = cur;
|
 |