Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DC_DEVICE_SET_CANCEL(3)	    Library Functions Manual   DC_DEVICE_SET_CANCEL(3)

NAME
       dc_device_set_cancel  --	 callback  to  check whether processing	should
       cancel

LIBRARY
       library "libdivecomputer"

SYNOPSIS
       #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);

DESCRIPTION
       Provide a function that the underlying device will periodically call to
       see if it should	cancel its processing.	The callback will return  zero
       if  the	operation  should  not	be cancelled, one if it	should be can-
       celled.

       The callback usually checks a value that	is set during  a  signal  han-
       dling  callback.	  For  example,	one can	invoke signal(3) to a function
       that sets a volatile sig_atomic_t value checked by  the	callback  han-
       dler.

RETURN VALUES
       Returns	  DC_STATUS_UNSUPPORTED	   if	the   device   is   NULL,   or
       DC_STATUS_SUCCESS otherwise.

SEE ALSO
       dc_device_open(3)

AUTHORS
       The library "libdivecomputer"  library  was  written  by	 Jef  Driesen,
       jef@libdivecomputer.org.	 These manpages	were written by
       Kristaps	Dzonsons, kristaps@bsd.lv.

FreeBSD	Ports 14.quarterly	January	5, 2017	       DC_DEVICE_SET_CANCEL(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dc_device_set_cancel&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help