}
#endif // __linux__
-static int sys_futex(void *addr1, int op, int val1, struct timespec *timeout, void *addr2, int val3)
+static int sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2,
+ int val3)
{
#ifdef __linux__
return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
{
}
-ssize_t audio_utils_fifo_writer::write(const void *buffer, size_t count, struct timespec *timeout)
+ssize_t audio_utils_fifo_writer::write(const void *buffer, size_t count,
+ const struct timespec *timeout)
__attribute__((no_sanitize("integer")))
{
audio_utils_iovec iovec[2];
// iovec == NULL is not part of the public API, but is used internally to mean don't set mObtained
ssize_t audio_utils_fifo_writer::obtain(audio_utils_iovec iovec[2], size_t count,
- struct timespec *timeout)
+ const struct timespec *timeout)
__attribute__((no_sanitize("integer")))
{
int err = 0;
// TODO Need a way to pass throttle capability to the another reader, should one reader exit.
}
-ssize_t audio_utils_fifo_reader::read(void *buffer, size_t count, struct timespec *timeout,
+ssize_t audio_utils_fifo_reader::read(void *buffer, size_t count, const struct timespec *timeout,
size_t *lost)
__attribute__((no_sanitize("integer")))
{
}
ssize_t audio_utils_fifo_reader::obtain(audio_utils_iovec iovec[2], size_t count,
- struct timespec *timeout)
+ const struct timespec *timeout)
__attribute__((no_sanitize("integer")))
{
return obtain(iovec, count, timeout, NULL /*lost*/);
// iovec == NULL is not part of the public API, but is used internally to mean don't set mObtained
ssize_t audio_utils_fifo_reader::obtain(audio_utils_iovec iovec[2], size_t count,
- struct timespec *timeout, size_t *lost)
+ const struct timespec *timeout, size_t *lost)
__attribute__((no_sanitize("integer")))
{
int err = 0;
* except they convey extra information as to the cause.
*/
virtual ssize_t obtain(audio_utils_iovec iovec[2], size_t count,
- struct timespec *timeout = NULL) = 0;
+ const struct timespec *timeout = NULL) = 0;
/**
* Release access to a portion of the most recently obtained slice.
* \retval -EINTR count is greater than zero, timeout is non-NULL and not {0, 0}, timeout
* was interrupted by a signal, and no frames were available after signal.
*/
- ssize_t write(const void *buffer, size_t count, struct timespec *timeout = NULL);
+ ssize_t write(const void *buffer, size_t count, const struct timespec *timeout = NULL);
// Implement audio_utils_fifo_provider
virtual ssize_t obtain(audio_utils_iovec iovec[2], size_t count,
- struct timespec *timeout = NULL);
+ const struct timespec *timeout = NULL);
virtual void release(size_t count);
virtual ssize_t available();
* \retval -EINTR count is greater than zero, timeout is non-NULL and not {0, 0}, timeout
* was interrupted by a signal, and no frames were available after signal.
*/
- ssize_t read(void *buffer, size_t count, struct timespec *timeout = NULL, size_t *lost = NULL);
+ ssize_t read(void *buffer, size_t count, const struct timespec *timeout = NULL,
+ size_t *lost = NULL);
// Implement audio_utils_fifo_provider
virtual ssize_t obtain(audio_utils_iovec iovec[2], size_t count,
- struct timespec *timeout = NULL);
+ const struct timespec *timeout = NULL);
virtual void release(size_t count);
virtual ssize_t available();
* \param lost If non-NULL, updated to the approximate number of lost frames before re-sync.
* \return See audio_utils_fifo_provider::obtain for 'Returns' and 'Return values'.
*/
- ssize_t obtain(audio_utils_iovec iovec[2], size_t count, struct timespec *timeout,
+ ssize_t obtain(audio_utils_iovec iovec[2], size_t count, const struct timespec *timeout,
size_t *lost);
/**