mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
fakesensor: replace usleep with nxsig_usleep.
N/A Signed-off-by: 丁欣童 <dingxintong@xiaomi.com> Change-Id: I636e1ccc5463cf247eb9c8e363d5c746d6c5afe5
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/sensors/fakesensor.h>
|
||||
#include <nuttx/sensors/sensor.h>
|
||||
#include <nuttx/signal.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
@@ -242,7 +243,7 @@ static int fakesensor_thread(int argc, char** argv)
|
||||
{
|
||||
/* Sleeping thread for interval */
|
||||
|
||||
usleep(sensor->batch ? sensor->batch : sensor->interval);
|
||||
nxsig_usleep(sensor->batch ? sensor->batch : sensor->interval);
|
||||
|
||||
/* Notify upper */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user