mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
thread-loop: constify timespec argument
This makes it easier for the user to see that pw_thread_loop_get_time() does not modify the timespec so that it can be reused over multiple calls.
This commit is contained in:
parent
04e769ff35
commit
38f88d3d25
2 changed files with 2 additions and 2 deletions
|
|
@ -435,7 +435,7 @@ int pw_thread_loop_get_time(struct pw_thread_loop *loop, struct timespec *abstim
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
int pw_thread_loop_timed_wait_full(struct pw_thread_loop *loop, struct timespec *abstime)
|
int pw_thread_loop_timed_wait_full(struct pw_thread_loop *loop, const struct timespec *abstime)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
loop->n_waiting++;
|
loop->n_waiting++;
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ int pw_thread_loop_get_time(struct pw_thread_loop *loop, struct timespec *abstim
|
||||||
/** Release the lock and wait up to \a abstime until some thread calls
|
/** Release the lock and wait up to \a abstime until some thread calls
|
||||||
* \ref pw_thread_loop_signal. Use \ref pw_thread_loop_get_time to make a timeout.
|
* \ref pw_thread_loop_signal. Use \ref pw_thread_loop_get_time to make a timeout.
|
||||||
* Since: 0.3.7 */
|
* Since: 0.3.7 */
|
||||||
int pw_thread_loop_timed_wait_full(struct pw_thread_loop *loop, struct timespec *abstime);
|
int pw_thread_loop_timed_wait_full(struct pw_thread_loop *loop, const struct timespec *abstime);
|
||||||
|
|
||||||
/** Signal all threads waiting with \ref pw_thread_loop_wait */
|
/** Signal all threads waiting with \ref pw_thread_loop_wait */
|
||||||
void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept);
|
void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue