Opened 15 years ago

Last modified 15 years ago

#228 closed defect

CPU lock taken when interrupts are enabled — at Initial Version

Reported by: Jakub Jermář Owned by:
Priority: major Milestone: 0.4.3
Component: helenos/kernel/generic Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

In changeset:head,378, the following change, which introduces a potential deadlock between the scheduler and the interrupt code, was made:

=== modified file 'kernel/generic/src/proc/scheduler.c'
--- kernel/generic/src/proc/scheduler.c	2010-02-22 21:24:19 +0000
+++ kernel/generic/src/proc/scheduler.c	2010-04-06 11:53:32 +0000
@@ -201,6 +201,9 @@
 		 * even though there is a runnable thread.
 		 */
 
+		 spinlock_lock(&CPU->lock);
+		 CPU->idle = true;
+		 spinlock_unlock(&CPU->lock);
 		 cpu_sleep();
 		 goto loop;
 	}

Change History (0)

Note: See TracTickets for help on using tickets.