AgsMutexManager

AgsMutexManager — mutex manager

Functions

Types and Values

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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.0


ags_mutex_manager_new ()

AgsMutexManager *
ags_mutex_manager_new ();

Instantiate a mutex manager.

Returns

a new AgsMutexManager

Since: 1.0.0


AGS_IS_MUTEX_MANAGER()

#define AGS_IS_MUTEX_MANAGER(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTEX_MANAGER))

AGS_MUTEX_MANAGER()

#define AGS_MUTEX_MANAGER(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTEX_MANAGER, AgsMutexManager))

AGS_MUTEX_MANAGER_CLASS()

#define AGS_MUTEX_MANAGER_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MUTEX_MANAGER, AgsMutexManagerClass))

AGS_MUTEX_MANAGER_GET_CLASS()

#define AGS_MUTEX_MANAGER_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MUTEX_MANAGER, AgsMutexManagerClass))

ags_mutex_manager_get_type ()

GType
ags_mutex_manager_get_type ();

Types and Values

AGS_TYPE_MUTEX_MANAGER

#define AGS_TYPE_MUTEX_MANAGER                (ags_mutex_manager_get_type())

struct AgsMutexManager

struct AgsMutexManager;

struct AgsMutexManagerClass

struct AgsMutexManagerClass {
  GObjectClass object;
};