Skip to content

Commit 70e1df6

Browse files
mlouieluiankuan
authored andcommitted
Remove sched_elect() in serialchar_callback()
Early triggering scheduler results in failure of unstacking in exception return. Unexpected exception return increases the probability of occurrence of faults, such as INVPC, INVSTATE. In this situation, we can't make sure that it wouldn't cause faults or invalid interrupt raising due to unfinished interrupt handling. For example, if a context switch is done inside the irq, it will make v7m-head.S `pop {pc}` to a undefined place. Closed: #12
1 parent 746cfb3 commit 70e1df6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/serial/serialchar.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
static void serialchar_callback(struct serial_info *serial)
88
{
99
sched_enqueue(serial->owner);
10-
sched_elect(0);
1110
}
1211

1312
static int serialchar_open(struct inode *inode, struct file *file)

0 commit comments

Comments
 (0)