Skip to content

Commit

Permalink
Remove sched_elect() in serialchar_callback()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mlouielu authored and jserv committed Oct 19, 2017
1 parent 266bde5 commit 2922ae9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/serial/serialchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
static void serialchar_callback(struct serial_info *serial)
{
sched_enqueue(serial->owner);
sched_elect(0);
}

static int serialchar_open(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 2922ae9

Please sign in to comment.