MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / sr_session_source_add_pollfd

Function sr_session_source_add_pollfd

libsigrok4DSL/session.c:418–423  ·  view source on GitHub ↗

* Add an event source for a GPollFD. * * @param pollfd The GPollFD. * @param timeout Max time to wait before the callback is called, ignored if 0. * @param cb Callback function to add. Must not be NULL. * @param cb_data Data for the callback function. Can be NULL. * * @return SR_OK upon success, SR_ERR_ARG upon invalid arguments, or * SR_ERR_MALLOC upon memory allocation errors. *

Source from the content-addressed store, hash-verified

416 * SR_ERR_MALLOC upon memory allocation errors.
417 */
418SR_PRIV int sr_session_source_add_pollfd(GPollFD *pollfd, int timeout,
419 sr_receive_data_callback_t cb, const struct sr_dev_inst *sdi)
420{
421 return _sr_session_source_add(pollfd, timeout, cb,
422 sdi, (gintptr)pollfd);
423}
424
425/**
426 * Add an event source for a GIOChannel.

Callers

nothing calls this directly

Calls 1

_sr_session_source_addFunction · 0.85

Tested by

no test coverage detected