Select loop abstraction

## Files

file | select.h
| select loop abstraction
file | select.c
| select loop abstraction

## Data Structures

struct | osmo_fd
| Structure representing a file dsecriptor. More...

## Macros

#define | BSC_FD_READ 0x0001
| Indicate interest in reading from the file descriptor.
#define | BSC_FD_WRITE 0x0002
| Indicate interest in writing to the file descriptor.
#define | BSC_FD_EXCEPT 0x0004
| Indicate interest in exceptions from the file descriptor.

## Functions

int | osmo_fd_register (struct osmo_fd *fd)
| Register a new file descriptor with select loop abstraction. More...
void | osmo_fd_unregister (struct osmo_fd *fd)
| Unregister a file descriptor from select loop abstraction. More...
int | osmo_select_main (int polling)
| select main loop integration More...
static | LLIST_HEAD (osmo_fds)

## Variables

static int | maxfd = 0
static int | unregistered_count

## Detailed Description

## Function Documentation

## osmo_fd_register()

int osmo_fd_register | ( | struct osmo_fd * | fd | ) |

Register a new file descriptor with select loop abstraction.

Parameters

  [in] | fd | osmocom file descriptor to be registered

References osmo_fd::fd.

Referenced by osmo_fd_init_ofd().

## osmo_fd_unregister()

void osmo_fd_unregister | ( | struct osmo_fd * | fd | ) |

Unregister a file descriptor from select loop abstraction.

Parameters

  [in] | fd | osmocom file descriptor to be unregistered

## osmo_select_main()

int osmo_select_main | ( | int | polling | ) |

select main loop integration

Parameters

  [in] | polling | should we pollonly (1) or block on select (0)

References BSC_FD_EXCEPT, BSC_FD_READ, BSC_FD_WRITE, osmo_fd::fd, and osmo_fd::when.