AgsMutexManager

AgsMutexManager — mutex manager

Functions

Object Hierarchy

    GObject
    ╰── AgsMutexManager

Implemented Interfaces

AgsMutexManager implements AgsConnectable.

Includes

#include <ags/thread/ags_mutex_manager.h>

Description

The AgsMutexManager keeps your mutex in a hash table where you can lookup your mutices.

Functions

ags_mutex_manager_get_application_mutex ()

pthread_mutex_t *
ags_mutex_manager_get_application_mutex
                               (AgsMutexManager *mutex_manager);

Retrieve the application mutex as per process pointer.

Parameters

mutex_manager

the AgsMutexManager

 

Returns

the application mutex

Since: 0.7.0


ags_mutex_manager_insert ()

gboolean
ags_mutex_manager_insert (AgsMutexManager *mutex_manager,
                          GObject *lock_object,
                          pthread_mutex_t *mutex);

Inserts a mutex into hash map associated with lock_object .

Parameters

mutex_manager

the AgsMutexManager

 

lock_object

the object as key

 

mutex

the mutex to insert

 

Returns

TRUE on success, otherwise FALSE

Since: 0.5.0


ags_mutex_manager_remove ()

gboolean
ags_mutex_manager_remove (AgsMutexManager *mutex_manager,
                          GObject *lock_object);

Removes a lock associated with lock_object.3

Parameters

mutex_manager

the AgsMutexManager

 

lock_object

the object to remove

 

Returns

TRUE as successfully removed, otherwise FALSE

Since: 0.5.0


ags_mutex_manager_lookup ()

pthread_mutex_t *
ags_mutex_manager_lookup (AgsMutexManager *mutex_manager,
                          GObject *lock_object);

Lookup a mutex associated with lock_object in mutex_manager

Parameters

mutex_manager

the AgsMutexManager

 

lock_object

the object to lookup

 

Returns

the mutex on success, else NULL

Since: 0.5.0


ags_mutex_manager_get_instance ()

AgsMutexManager *
ags_mutex_manager_get_instance ();

Singleton function to optain the mutex manager instance.

Returns

an instance of AgsMutexManager

Since: 0.5.0


ags_mutex_manager_new ()

AgsMutexManager *
ags_mutex_manager_new ();

Instantiate a mutex manager.

Returns

a new AgsMutexManager

Since: 0.5.0

Types and Values