]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/rtpoll.h
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / rtpoll.h
index b2a87fca6a0877573ee7d44d7ca7099bb69570e6..43ff5e63946ae44f6dba8dba48efe6382ed4d0f6 100644 (file)
  * yet another wrapper around poll(). However it has certain
  * advantages over pa_mainloop and suchlike:
  *
- * 1) It uses timer_create() and POSIX real time signals to guarantee
- * optimal high-resolution timing. Starting with Linux 2.6.21 hrtimers
- * are available, and since right now only nanosleep() and the POSIX
- * clock and timer interfaces have been ported to hrtimers (and not
- * ppoll/pselect!) we have to combine ppoll() with timer_create(). The
- * fact that POSIX timers and POSIX rt signals are used internally is
- * completely hidden.
+ * 1) High resolution timers are used
  *
  * 2) It allows raw access to the pollfd data to users
  *
@@ -53,7 +47,7 @@ typedef struct pa_rtpoll pa_rtpoll;
 typedef struct pa_rtpoll_item pa_rtpoll_item;
 
 typedef enum pa_rtpoll_priority {
-    PA_RTPOLL_EARLY  = -100,          /* For veeery important stuff, like handling control messages */
+    PA_RTPOLL_EARLY  = -100,          /* For very important stuff, like handling control messages */
     PA_RTPOLL_NORMAL = 0,             /* For normal stuff */
     PA_RTPOLL_LATE   = +100,          /* For housekeeping */
     PA_RTPOLL_NEVER  = INT_MAX,       /* For stuff that doesn't register any callbacks, but only fds to listen on */
@@ -67,15 +61,15 @@ void pa_rtpoll_free(pa_rtpoll *p);
  * struct pollfd. Returns negative on error, positive if the loop
  * should continue to run, 0 when the loop should be terminated
  * cleanly. */
-int pa_rtpoll_run(pa_rtpoll *f, pa_bool_t wait);
+int pa_rtpoll_run(pa_rtpoll *f, bool wait);
 
 void pa_rtpoll_set_timer_absolute(pa_rtpoll *p, pa_usec_t usec);
 void pa_rtpoll_set_timer_relative(pa_rtpoll *p, pa_usec_t usec);
 void pa_rtpoll_set_timer_disabled(pa_rtpoll *p);
 
-/* Return TRUE when the elapsed timer was the reason for
+/* Return true when the elapsed timer was the reason for
  * the last pa_rtpoll_run() invocation to finish */
-pa_bool_t pa_rtpoll_timer_elapsed(pa_rtpoll *p);
+bool pa_rtpoll_timer_elapsed(pa_rtpoll *p);
 
 /* A new fd wakeup item for pa_rtpoll */
 pa_rtpoll_item *pa_rtpoll_item_new(pa_rtpoll *p, pa_rtpoll_priority_t prio, unsigned n_fds);
@@ -88,13 +82,12 @@ struct pollfd *pa_rtpoll_item_get_pollfd(pa_rtpoll_item *i, unsigned *n_fds);
 
 /* Set the callback that shall be called when there's time to do some work: If the
  * callback returns a value > 0, the poll is skipped and the next
- * iteraton of the loop will start immediately. */
+ * iteration of the loop will start immediately. */
 void pa_rtpoll_item_set_work_callback(pa_rtpoll_item *i, int (*work_cb)(pa_rtpoll_item *i));
 
 /* Set the callback that shall be called immediately before entering
  * the sleeping poll: If the callback returns a value > 0, the poll is
- * skipped and the next iteraton of the loop will start
- * immediately.. */
+ * skipped and the next iteration of the loop will start immediately. */
 void pa_rtpoll_item_set_before_callback(pa_rtpoll_item *i, int (*before_cb)(pa_rtpoll_item *i));
 
 /* Set the callback that shall be called immediately after having