## prelude-async prelude-async |

## Functions

void | (*prelude_async_callback_t) ()
int | prelude_async_init ()
prelude_async_flags_t | prelude_async_get_flags ()
void | prelude_async_set_flags ()
void | prelude_async_add ()
void | prelude_async_del ()
void | prelude_async_exit ()

## Types and Values

enum | prelude_async_flags_t
#define | PRELUDE_ASYNC_OBJECT
| prelude_async_object_t

## Description

## Functions

### prelude_async_callback_t ()

    void
    (*prelude_async_callback_t) (void *object,
                                 void *data);

### prelude_async_init ()

    int
    prelude_async_init (void);

Initialize the asynchronous subsystem.

#### Returns

0 on success, -1 if an error occured.

### prelude_async_get_flags ()

    prelude_async_flags_t
    prelude_async_get_flags (void);

Retrieves flags from the asynchronous subsystem

#### Returns

asynchronous flags

### prelude_async_set_flags ()

    void
    prelude_async_set_flags (prelude_async_flags_t flags);

Sets flags to the asynchronous subsystem.

#### Parameters

flags | flags you want to set |

### prelude_async_add ()

    void
    prelude_async_add (prelude_async_object_t *obj);

Adds `obj` to the asynchronous processing list.

#### Parameters

obj | Pointer to a prelude_async_t object. |

### prelude_async_del ()

    void
    prelude_async_del (prelude_async_object_t *obj);

Deletes `obj` from the asynchronous processing list.

#### Parameters

obj | Pointer to a prelude_async_t object. |

### prelude_async_exit ()

    void
    prelude_async_exit (void);

## Types and Values

### enum prelude_async_flags_t

This provides asynchronous timer. When enabled, the heartbeat function (and user specified callback, if any) will be called automatically, from an asynchronous thread.

If you use this flags, you won't need to call `prelude_wake_up_timer()` anymore.

#### Members

PRELUDE_ASYNC_FLAGS_TIMER | Enable asynchronous timer. |

### PRELUDE_ASYNC_OBJECT

    #define             PRELUDE_ASYNC_OBJECT

### prelude_async_object_t

    typedef struct {
            PRELUDE_ASYNC_OBJECT;
    } prelude_async_object_t;