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

Go to the source code of this file.

Functions

 DEFINE_SPINLOCK (sync_lock)
 
void sync_set_event (struct sync_object *event)
 
int sync_wait_on_multiple_events (struct sync_object **events, unsigned count, unsigned timeout, unsigned *index)
 
int dsp_notifier_event (struct notifier_block *this, unsigned long event, void *data)
 

Function Documentation

DEFINE_SPINLOCK ( sync_lock  )
int dsp_notifier_event ( struct notifier_block this,
unsigned long  event,
void data 
)

dsp_notifier_event() - callback function to nofity events : pointer to itself struct notifier_block : event to be notified. : Currently not used.

Definition at line 113 of file sync.c.

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.

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.