From: Bert Vermeulen Date: Thu, 18 Jul 2013 13:06:06 +0000 (+0200) Subject: Make sr_session_iteration() private X-Git-Tag: libsigrok-0.2.1~23 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=f6eb2cb555aa79d57a20a754df66e83d897be668;hp=2b691be80654ca0cba58576c907c2c3e02e1f680;p=libsigrok.git Make sr_session_iteration() private --- diff --git a/libsigrok-internal.h b/libsigrok-internal.h index 5fc0fbfa..453c6583 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -116,6 +116,7 @@ SR_PRIV int sr_source_add(int fd, int events, int timeout, /*--- session.c -------------------------------------------------------------*/ +SR_PRIV int sr_session_iteration(gboolean block); SR_PRIV int sr_session_send(const struct sr_dev_inst *sdi, const struct sr_datafeed_packet *packet); SR_PRIV int sr_session_stop_sync(void); diff --git a/proto.h b/proto.h index b1adb35f..821846f2 100644 --- a/proto.h +++ b/proto.h @@ -97,7 +97,6 @@ SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback_t cb, void *cb_data); /* Session control */ -SR_API int sr_session_iteration(gboolean block); SR_API int sr_session_start(void); SR_API int sr_session_run(void); SR_API int sr_session_stop(void); diff --git a/session.c b/session.c index 720b5ae1..514b620a 100644 --- a/session.c +++ b/session.c @@ -239,9 +239,16 @@ SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback_t cb, void *cb_ * but driven by another scheduler, this can be used to poll the devices * from within that scheduler. * + * @param block If TRUE, this call will wait for any of the session's + * sources to fire an event on the file descriptors, or + * any of their timeouts to activate. In other words, this + * can be used as a select loop. + * If FALSE, all sources have their callback run, regardless + * of file descriptor or timeout status. + * * @return SR_OK upon success, SR_ERR on errors. */ -SR_API int sr_session_iteration(gboolean block) +SR_PRIV int sr_session_iteration(gboolean block) { unsigned int i; int ret;