DC_DEVICE_SET_CANCEL(3) | Library Functions Manual | DC_DEVICE_SET_CANCEL(3) |
dc_device_set_cancel
—
#include
<libdivecomputer/device.h>
typedef int
(*dc_cancel_callback_t)
(void
*userdata);
dc_status_t
dc_device_set_cancel
(dc_device_t
*device, dc_cancel_callback_t callback,
void *userdata);
The callback usually checks a value that is set during a signal handling callback. For example, one can invoke signal(3) to a function that sets a volatile sig_atomic_t value checked by the callback handler.
DC_STATUS_UNSUPPORTED
if the
device is NULL
, or
DC_STATUS_SUCCESS
otherwise.
January 5, 2017 | NetBSD 10.0 |