mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
sched/wdog: Remove MAX_WDOGPARMS and related stuff
since the variable arguments are error prone and seldom used. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -54,7 +54,6 @@
|
||||
* becomes non-empty.
|
||||
*
|
||||
* Input Parameters:
|
||||
* argc - the number of arguments (should be 1)
|
||||
* pid - the task ID of the task to wakeup
|
||||
*
|
||||
* Returned Value:
|
||||
@@ -64,7 +63,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void nxmq_rcvtimeout(int argc, wdparm_t pid, ...)
|
||||
static void nxmq_rcvtimeout(wdparm_t pid)
|
||||
{
|
||||
FAR struct tcb_s *wtcb;
|
||||
irqstate_t flags;
|
||||
@@ -79,7 +78,7 @@ static void nxmq_rcvtimeout(int argc, wdparm_t pid, ...)
|
||||
* longer be active when this watchdog goes off.
|
||||
*/
|
||||
|
||||
wtcb = nxsched_get_tcb((pid_t)pid);
|
||||
wtcb = nxsched_get_tcb(pid);
|
||||
|
||||
/* It is also possible that an interrupt/context switch beat us to the
|
||||
* punch and already changed the task's state.
|
||||
@@ -209,8 +208,7 @@ ssize_t nxmq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen,
|
||||
|
||||
/* Start the watchdog */
|
||||
|
||||
wd_start(&rtcb->waitdog, ticks,
|
||||
nxmq_rcvtimeout, 1, (wdparm_t)getpid());
|
||||
wd_start(&rtcb->waitdog, ticks, nxmq_rcvtimeout, getpid());
|
||||
}
|
||||
|
||||
/* Get the message from the message queue */
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
* becomes non-full.
|
||||
*
|
||||
* Input Parameters:
|
||||
* argc - the number of arguments (should be 1)
|
||||
* pid - the task ID of the task to wakeup
|
||||
*
|
||||
* Returned Value:
|
||||
@@ -63,7 +62,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void nxmq_sndtimeout(int argc, wdparm_t pid, ...)
|
||||
static void nxmq_sndtimeout(wdparm_t pid)
|
||||
{
|
||||
FAR struct tcb_s *wtcb;
|
||||
irqstate_t flags;
|
||||
@@ -78,7 +77,7 @@ static void nxmq_sndtimeout(int argc, wdparm_t pid, ...)
|
||||
* longer be active when this watchdog goes off.
|
||||
*/
|
||||
|
||||
wtcb = nxsched_get_tcb((pid_t)pid);
|
||||
wtcb = nxsched_get_tcb(pid);
|
||||
|
||||
/* It is also possible that an interrupt/context switch beat us to the
|
||||
* punch and already changed the task's state.
|
||||
@@ -244,7 +243,7 @@ int nxmq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen,
|
||||
|
||||
/* Start the watchdog and begin the wait for MQ not full */
|
||||
|
||||
wd_start(&rtcb->waitdog, ticks, nxmq_sndtimeout, 1, (wdparm_t)getpid());
|
||||
wd_start(&rtcb->waitdog, ticks, nxmq_sndtimeout, getpid());
|
||||
|
||||
/* And wait for the message queue to be non-empty */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user