[syscalls] Remove mx_timer_start
Change-Id: I35863de22152735f0050a01e388711f2b8e73050
Esse commit está contido em:
@@ -101,7 +101,6 @@
|
||||
|
||||
## Timers
|
||||
+ [timer_create](syscalls/timer_create.md) - create a timer object
|
||||
+ [timer_start (deprecated)](syscalls/timer_start.md) - start a timer
|
||||
+ [timer_set](syscalls/timer_set.md) - start a timer
|
||||
+ [timer_cancel](syscalls/timer_cancel.md) - cancel a timer
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ mx_status_t mx_timer_cancel(mx_handle_t handle);
|
||||
## DESCRIPTION
|
||||
|
||||
**mx_timer_cancel**() cancels a pending timer that was started with
|
||||
**timer_start**().
|
||||
**timer_set**().
|
||||
|
||||
Upon success the pending timer is canceled and the MX_TIMER_SIGNALED
|
||||
signal is de-asserted. If a new pending timer is immediately needed
|
||||
rather than calling **timer_cancel**() first, call **timer_start**()
|
||||
rather than calling **timer_cancel**() first, call **timer_set**()
|
||||
with the new deadline.
|
||||
|
||||
## RETURN VALUE
|
||||
@@ -36,9 +36,9 @@ In the event of failure, a negative error value is returned.
|
||||
|
||||
## NOTE
|
||||
|
||||
Calling this function before **timer_start**() has no effect.
|
||||
Calling this function before **timer_set**() has no effect.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
[timer_create](timer_create.md),
|
||||
[timer_start](timer_start.md)
|
||||
[timer_set](timer_set.md)
|
||||
|
||||
@@ -37,7 +37,7 @@ of failure, a negative error value is returned.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
[timer_start](timer_start.md),
|
||||
[timer_set](timer_set.md),
|
||||
[timer_cancel](timer_cancel.md),
|
||||
[deadline_after](deadline_after.md),
|
||||
[handle_close](handle_close.md)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# mx_timer_start
|
||||
|
||||
## NAME
|
||||
|
||||
timer_start - start a timer (deprecated)
|
||||
|
||||
## SYNOPSIS
|
||||
|
||||
```
|
||||
#include <magenta/syscalls.h>
|
||||
|
||||
mx_status_t mx_timer_start(mx_handle_t handle, mx_time_t deadline, mx_duration_t period,
|
||||
mx_duration_t slack);
|
||||
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
This syscall is deprecated, use **mx_timer_set()**.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
[timer_create](timer_create.md),
|
||||
[timer_set](timer_set.md),
|
||||
[timer_cancel](timer_cancel.md),
|
||||
[deadline_after](deadline_after.md)
|
||||
@@ -49,19 +49,6 @@ mx_status_t sys_timer_create(uint32_t options, uint32_t clock_id, user_ptr<mx_ha
|
||||
return MX_OK;
|
||||
}
|
||||
|
||||
// This syscall is deprecated. The clients should transiton to sys_timer_set().
|
||||
mx_status_t sys_timer_start(
|
||||
mx_handle_t handle, mx_time_t deadline, mx_duration_t period, mx_duration_t slack) {
|
||||
auto up = ProcessDispatcher::GetCurrent();
|
||||
|
||||
mxtl::RefPtr<TimerDispatcher> timer;
|
||||
mx_status_t status = up->GetDispatcherWithRights(handle, MX_RIGHT_WRITE, &timer);
|
||||
if (status != MX_OK)
|
||||
return status;
|
||||
|
||||
return timer->Set(deadline, 0u, period);
|
||||
}
|
||||
|
||||
mx_status_t sys_timer_set(
|
||||
mx_handle_t handle, mx_time_t deadline, mx_duration_t slack) {
|
||||
auto up = ProcessDispatcher::GetCurrent();
|
||||
|
||||
@@ -339,10 +339,6 @@ syscall timer_create
|
||||
(options: uint32_t, clock_id: uint32_t)
|
||||
returns (mx_status_t, out: mx_handle_t handle_acquire);
|
||||
|
||||
syscall timer_start
|
||||
(handle: mx_handle_t, deadline: mx_time_t, period: mx_duration_t, slack: mx_duration_t)
|
||||
returns (mx_status_t);
|
||||
|
||||
syscall timer_set
|
||||
(handle: mx_handle_t, deadline: mx_time_t, slack: mx_duration_t)
|
||||
returns (mx_status_t);
|
||||
|
||||
@@ -30,11 +30,6 @@ public:
|
||||
|
||||
static mx_status_t create(uint32_t options, uint32_t clock_id, timer* result);
|
||||
|
||||
// This method is deprecated.
|
||||
mx_status_t start(mx_time_t deadline, mx_duration_t period, mx_duration_t slack) const {
|
||||
return mx_timer_start(get(), deadline, period, slack);
|
||||
}
|
||||
|
||||
mx_status_t set(mx_time_t deadline, mx_duration_t slack) const {
|
||||
return mx_timer_set(get(), deadline, slack);
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário