More documentation enhancements / removal of non-existent functions.

This commit is contained in:
Jaroslav Kysela 2001-07-11 15:48:27 +00:00
parent 052be891a5
commit 3590f6ecd3
18 changed files with 153 additions and 12 deletions

View file

@ -1,3 +1,8 @@
/**
* \file async.c
* \author Abramo Bagnara <abramo@alsa-project.org>
* \date 2001
*/
/*
* Async notification helpers
* Copyright (c) 2001 by Abramo Bagnara <abramo@alsa-project.org>
@ -23,6 +28,7 @@
#include <signal.h>
#ifdef SND_ASYNC_RT_SIGNAL
/** async signal number */
int snd_async_signo;
void snd_async_init(void) __attribute__ ((constructor));
@ -35,6 +41,7 @@ void snd_async_init(void)
}
}
#else
/** async signal number */
int snd_async_signo = SIGIO;
#endif
@ -55,6 +62,14 @@ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, vo
}
}
/**
* \brief Add async handler
* \param handler Result - async handler
* \param fd - File descriptor
* \param callback - Async callback
* \param private_data - Private data for async callback
* \result zero if success, otherwise a negative error code
*/
int snd_async_add_handler(snd_async_handler_t **handler, int fd,
snd_async_callback_t callback, void *private_data)
{
@ -84,6 +99,11 @@ int snd_async_add_handler(snd_async_handler_t **handler, int fd,
return 0;
}
/**
* \brief Delete async handler
* \param handler Async handler to delete
* \result zero if success, otherwise a negative error code
*/
int snd_async_del_handler(snd_async_handler_t *handler)
{
int err = 0;
@ -118,11 +138,21 @@ int snd_async_del_handler(snd_async_handler_t *handler)
return err;
}
/**
* \brief Get file descriptor assigned to async handler
* \param handler Async handler
* \result file descriptor if success, otherwise a negative error code
*/
int snd_async_handler_get_fd(snd_async_handler_t *handler)
{
return handler->fd;
}
/**
* \brief Get private data assigned to async handler
* \param handler Async handler
* \result private data if success, otherwise a negative error code
*/
void *snd_async_handler_get_callback_private(snd_async_handler_t *handler)
{
return handler->private_data;