Attach / detach Syscall API
[Level 0 API (Syscall API)]

Collaboration diagram for Attach / detach Syscall API:


Functions

int a4l_sys_attach (int fd, a4l_lnkdesc_t *arg)
 Attach an Analogy device to a driver.
int a4l_sys_detach (int fd)
 Detach an Analogy device from a driver.
int a4l_sys_bufcfg (int fd, unsigned int idx_subd, unsigned long size)
 Configure the buffer size.


Function Documentation

int a4l_sys_attach ( int  fd,
a4l_lnkdesc_t *  arg 
)

Attach an Analogy device to a driver.

Parameters:
[in] fd File descriptor as returned by a4l_sys_open()
[in] arg Link descriptor argument
Returns:
0 on success. Otherwise:
  • -ENOMEM is returned if the system is out of memory
  • -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
  • -EFAULT is returned if a user <-> kernel transfer went wrong
  • -ENODEV is returned in case of internal error (Please, type "dmesg" for more info)
  • -ENXIO is returned in case of internal error (Please, type "dmesg" for more info)

int a4l_sys_bufcfg ( int  fd,
unsigned int  idx_subd,
unsigned long  size 
)

Configure the buffer size.

This function can configure the buffer size of the file descriptor currently in use. If the subdevice index is set to A4L_BUF_DEFMAGIC, it can also define the default buffser size at open time.

Parameters:
[in] fd File descriptor as returned by a4l_sys_open()
[in] idx_subd Index of the concerned subdevice
int] size Buffer size to be set
Returns:
0 on success. Otherwise:
  • -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
  • -EPERM is returned if the function is called in an RT context or if the buffer to resize is mapped in user-space (Please, type "dmesg" for more info)
  • -EFAULT is returned if a user <-> kernel transfer went wrong
  • -EBUSY is returned if the selected subdevice is already processing an asynchronous operation
  • -ENOMEM is returned if the system is out of memory

Referenced by a4l_set_bufsize().

int a4l_sys_detach ( int  fd  ) 

Detach an Analogy device from a driver.

Parameters:
[in] fd File descriptor as returned by a4l_sys_open()
Returns:
0 on success. Otherwise:
  • -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
  • -EBUSY is returned if the device to be detached is in use
  • -EPERM is returned if the devive to be detached still has some buffer mapped in user-space
  • -ENODEV is returned in case of internal error (Please, type "dmesg" for more info)
  • -ENXIO is returned in case of internal error (Please, type "dmesg" for more info)


Generated on Tue Mar 8 13:02:08 2011 for Xenomai API by  doxygen 1.5.6