Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sync.h File Reference
#include <dspbridge/dbdefs.h>
#include <dspbridge/host_os.h>

Go to the source code of this file.

Data Structures

struct  sync_object
 

Macros

#define SYNC_INFINITE   0xffffffff
 

Functions

void sync_set_event (struct sync_object *event)
 
int sync_wait_on_multiple_events (struct sync_object **events, unsigned count, unsigned timeout, unsigned *index)
 

Macro Definition Documentation

#define SYNC_INFINITE   0xffffffff

Definition at line 27 of file sync.h.

Function Documentation

void sync_set_event ( struct sync_object event)

sync_set_event() - set or signal and specified event : Event to be set..

set the , if there is an thread waiting for the event it will be waken up, this function only wakes one thread.

Definition at line 36 of file sync.c.

int sync_wait_on_multiple_events ( struct sync_object **  events,
unsigned  count,
unsigned  timeout,
unsigned *  index 
)

sync_wait_on_multiple_events() - waits for multiple events to be set. : Array of events to wait for them. : number of elements of the array. timeout on waiting for the evetns. index of the event set.

This function will wait until any of the array element is set or until timeout. In case of success the function will return 0 and will store the index of the array element set and in case of timeout the function will return -ETIME.

sync_wait_on_multiple_events() - waits for multiple events to be set. : Array of events to wait for them. : number of elements of the array. timeout on waiting for the evetns. index of the event set.

These functions will wait until any of the array element is set or until timeout. In case of success the function will return 0 and will store the index of the array element set or in case of timeout the function will return -ETIME or in case of interrupting by a signal it will return -EPERM.

Definition at line 59 of file sync.c.