SwamiLock

SwamiLock

Synopsis

                    SwamiLock;
#define             SWAMI_LOCK_WRITE                    (lock)
#define             SWAMI_UNLOCK_WRITE                  (lock)
#define             SWAMI_LOCK_READ                     (lock)
#define             SWAMI_UNLOCK_READ                   (lock)
void                swami_lock_set_atomic               (gpointer lock,
                                                         const char *first_property_name,
                                                         ...);
void                swami_lock_get_atomic               (gpointer lock,
                                                         const char *first_property_name,
                                                         ...);

Object Hierarchy

  GObject
   +----SwamiLock
         +----SwamiControl
         +----SwamiControlQueue
         +----SwamiMidiDevice
         +----SwamiRoot
         +----SwamiWavetbl
         +----SwamiPropTree
         +----SwamiLoopFinder

Description

Details

SwamiLock

typedef struct _SwamiLock SwamiLock;

SWAMI_LOCK_WRITE()

#define             SWAMI_LOCK_WRITE(lock)

SWAMI_UNLOCK_WRITE()

#define             SWAMI_UNLOCK_WRITE(lock)

SWAMI_LOCK_READ()

#define SWAMI_LOCK_READ(lock) SWAMI_LOCK_WRITE(lock)

SWAMI_UNLOCK_READ()

#define SWAMI_UNLOCK_READ(lock) SWAMI_UNLOCK_WRITE(lock)

swami_lock_set_atomic ()

void                swami_lock_set_atomic               (gpointer lock,
                                                         const char *first_property_name,
                                                         ...);

Sets properties on a Swami lock item atomically (i.e. item is multi-thread locked while all properties are set). This avoids critical parameter sync problems when multiple threads are accessing the same item. See g_object_set() for more information on setting properties. This function is rarely needed, only useful for cases where multiple properties depend on each other.

lock :

SwamiLock derived object to set properties of

first_property_name :

Name of first property

... :

Variable list of arguments that should start with the value to set first_property_name to, followed by property name/value pairs. List is terminated with a NULL property name.

swami_lock_get_atomic ()

void                swami_lock_get_atomic               (gpointer lock,
                                                         const char *first_property_name,
                                                         ...);

Gets properties from a Swami lock item atomically (i.e. item is multi-thread locked while all properties are retrieved). This avoids critical parameter sync problems when multiple threads are accessing the same item. See g_object_get() for more information on getting properties. This function is rarely needed, only useful when multiple properties depend on each other.

lock :

SwamiLock derived object to get properties from

first_property_name :

Name of first property

... :

Variable list of arguments that should start with a pointer to store the value from first_property_name, followed by property name/value pointer pairs. List is terminated with a NULL property name.