Cancels a pending timer request.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/timer.h>
  int tstop ( t)
struct trb *t;
| Item | Description | 
|---|---|
| t | Specifies the pending timer request to cancel. | 
The tstop kernel service cancels a pending timer request. The tstop kernel service must be called before a timer request block can be freed with the tfree kernel service.
In a multiprocessor environment, the timer function associated with a timer request block may be active on another processor when the tstop kernel service is called. In this case, the timer request cannot be canceled. A multiprocessor-safe driver must therefore check the return code and take appropriate action if the cancel request failed.
while (tstop(&trp)) {
       release_any_lock;
       delay_some_time;
       reacquire_the_lock;
} /* null while loop if locks not used */
The tstop kernel service can be called from either the process or interrupt environment.
| Item | Description | 
|---|---|
| 0 | Indicates that the request was successfully canceled. | 
| -1 | Indicates that the request could not be canceled. |