drivers: modem: gsm: introduce lock
After the introduction of start/stop & rssi query work, these
additional functions can be invoked from different threads.
Things can quickly become hard to analyze when an interrupt
fires during one of these functions and upon return the
scheduler schedules another thread and run another function.
This PR introduces a simple mutex lock that guarantees thread
safety. Similar implementation can be found in hl7800 driver,
which has lots of public APIs that can be invoked from different
threads.
Signed-off-by:
Yong Cong Sin <yongcong.sin@gmail.com>
Update gsm_ppp.c
Loading
Please sign in to comment