summaryrefslogtreecommitdiff
path: root/src/threads/Semaphore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/threads/Semaphore.c')
-rw-r--r--src/threads/Semaphore.c492
1 files changed, 300 insertions, 192 deletions
diff --git a/src/threads/Semaphore.c b/src/threads/Semaphore.c
index c93420b..0d5bd4d 100644
--- a/src/threads/Semaphore.c
+++ b/src/threads/Semaphore.c
@@ -1,4 +1,4 @@
-/* Semaphore.c generated by valac 0.36.6, the Vala compiler
+/* Semaphore.c generated by valac 0.40.4, the Vala compiler
* generated from Semaphore.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -10,6 +10,7 @@
/* mechanism (essentially, a blocking mechanism) to the system of callbacks that BackgroundJob*/
/* offers. They can also be used for other job-dependent notification mechanisms.*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -159,19 +160,23 @@ static gpointer event_semaphore_parent_class = NULL;
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
-GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_abstract_semaphore (GValue* value, gpointer v_object);
-void value_take_abstract_semaphore (GValue* value, gpointer v_object);
+GParamSpec* param_spec_abstract_semaphore (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_abstract_semaphore (GValue* value,
+ gpointer v_object);
+void value_take_abstract_semaphore (GValue* value,
+ gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
GType abstract_semaphore_notify_action_get_type (void) G_GNUC_CONST;
GType abstract_semaphore_wait_action_get_type (void) G_GNUC_CONST;
GType abstract_semaphore_type_get_type (void) G_GNUC_CONST;
#define ABSTRACT_SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphorePrivate))
-enum {
- ABSTRACT_SEMAPHORE_DUMMY_PROPERTY
-};
-AbstractSemaphore* abstract_semaphore_construct (GType object_type, AbstractSemaphoreType type);
+AbstractSemaphore* abstract_semaphore_construct (GType object_type,
+ AbstractSemaphoreType type);
static void abstract_semaphore_trigger (AbstractSemaphore* self);
void abstract_semaphore_notify (AbstractSemaphore* self);
AbstractSemaphoreNotifyAction abstract_semaphore_do_notify (AbstractSemaphore* self);
@@ -186,9 +191,6 @@ static gboolean abstract_semaphore_real_do_reset (AbstractSemaphore* self);
static void abstract_semaphore_finalize (AbstractSemaphore * obj);
GType semaphore_get_type (void) G_GNUC_CONST;
#define SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SEMAPHORE, SemaphorePrivate))
-enum {
- SEMAPHORE_DUMMY_PROPERTY
-};
Semaphore* semaphore_new (void);
Semaphore* semaphore_construct (GType object_type);
static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore* base);
@@ -196,19 +198,14 @@ static AbstractSemaphoreWaitAction semaphore_real_do_wait (AbstractSemaphore* ba
static void semaphore_finalize (AbstractSemaphore * obj);
GType countdown_semaphore_get_type (void) G_GNUC_CONST;
#define COUNTDOWN_SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_COUNTDOWN_SEMAPHORE, CountdownSemaphorePrivate))
-enum {
- COUNTDOWN_SEMAPHORE_DUMMY_PROPERTY
-};
CountdownSemaphore* countdown_semaphore_new (gint total);
-CountdownSemaphore* countdown_semaphore_construct (GType object_type, gint total);
+CountdownSemaphore* countdown_semaphore_construct (GType object_type,
+ gint total);
static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (AbstractSemaphore* base);
static AbstractSemaphoreWaitAction countdown_semaphore_real_do_wait (AbstractSemaphore* base);
static void countdown_semaphore_finalize (AbstractSemaphore * obj);
GType event_semaphore_get_type (void) G_GNUC_CONST;
#define EVENT_SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EVENT_SEMAPHORE, EventSemaphorePrivate))
-enum {
- EVENT_SEMAPHORE_DUMMY_PROPERTY
-};
EventSemaphore* event_semaphore_new (void);
EventSemaphore* event_semaphore_construct (GType object_type);
static AbstractSemaphoreNotifyAction event_semaphore_real_do_notify (AbstractSemaphore* base);
@@ -221,7 +218,9 @@ static void _vala_clear_GRWLock (GRWLock * mutex);
static void _vala_clear_GCond (GCond * mutex);
-GType abstract_semaphore_type_get_type (void) {
+GType
+abstract_semaphore_type_get_type (void)
+{
static volatile gsize abstract_semaphore_type_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_type_type_id__volatile)) {
static const GEnumValue values[] = {{ABSTRACT_SEMAPHORE_TYPE_SERIAL, "ABSTRACT_SEMAPHORE_TYPE_SERIAL", "serial"}, {ABSTRACT_SEMAPHORE_TYPE_BROADCAST, "ABSTRACT_SEMAPHORE_TYPE_BROADCAST", "broadcast"}, {0, NULL, NULL}};
@@ -233,7 +232,9 @@ GType abstract_semaphore_type_get_type (void) {
}
-GType abstract_semaphore_notify_action_get_type (void) {
+GType
+abstract_semaphore_notify_action_get_type (void)
+{
static volatile gsize abstract_semaphore_notify_action_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_notify_action_type_id__volatile)) {
static const GEnumValue values[] = {{ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE, "ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE", "none"}, {ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL, "ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL", "signal"}, {0, NULL, NULL}};
@@ -245,7 +246,9 @@ GType abstract_semaphore_notify_action_get_type (void) {
}
-GType abstract_semaphore_wait_action_get_type (void) {
+GType
+abstract_semaphore_wait_action_get_type (void)
+{
static volatile gsize abstract_semaphore_wait_action_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_wait_action_type_id__volatile)) {
static const GEnumValue values[] = {{ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP, "ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP", "sleep"}, {ABSTRACT_SEMAPHORE_WAIT_ACTION_READY, "ABSTRACT_SEMAPHORE_WAIT_ACTION_READY", "ready"}, {0, NULL, NULL}};
@@ -257,41 +260,37 @@ GType abstract_semaphore_wait_action_get_type (void) {
}
-AbstractSemaphore* abstract_semaphore_construct (GType object_type, AbstractSemaphoreType type) {
+AbstractSemaphore*
+abstract_semaphore_construct (GType object_type,
+ AbstractSemaphoreType type)
+{
AbstractSemaphore* self = NULL;
gboolean _tmp0_ = FALSE;
- AbstractSemaphoreType _tmp1_;
- AbstractSemaphoreType _tmp3_;
#line 30 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (AbstractSemaphore*) g_type_create_instance (object_type);
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp1_ = type;
-#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- if (_tmp1_ == ABSTRACT_SEMAPHORE_TYPE_SERIAL) {
+ if (type == ABSTRACT_SEMAPHORE_TYPE_SERIAL) {
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = TRUE;
-#line 274 "Semaphore.c"
+#line 276 "Semaphore.c"
} else {
- AbstractSemaphoreType _tmp2_;
-#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp2_ = type;
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = _tmp2_ == ABSTRACT_SEMAPHORE_TYPE_BROADCAST;
-#line 281 "Semaphore.c"
+ _tmp0_ = type == ABSTRACT_SEMAPHORE_TYPE_BROADCAST;
+#line 280 "Semaphore.c"
}
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_vala_assert (_tmp0_, "type == Type.SERIAL || type == Type.BROADCAST");
#line 33 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp3_ = type;
-#line 33 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- self->priv->type = _tmp3_;
+ self->priv->type = type;
#line 30 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 291 "Semaphore.c"
+#line 288 "Semaphore.c"
}
-static void abstract_semaphore_trigger (AbstractSemaphore* self) {
+static void
+abstract_semaphore_trigger (AbstractSemaphore* self)
+{
AbstractSemaphoreType _tmp0_;
#line 36 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (IS_ABSTRACT_SEMAPHORE (self));
@@ -301,69 +300,70 @@ static void abstract_semaphore_trigger (AbstractSemaphore* self) {
if (_tmp0_ == ABSTRACT_SEMAPHORE_TYPE_SERIAL) {
#line 38 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_cond_signal (&self->priv->monitor);
-#line 305 "Semaphore.c"
+#line 304 "Semaphore.c"
} else {
#line 40 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_cond_broadcast (&self->priv->monitor);
-#line 309 "Semaphore.c"
+#line 308 "Semaphore.c"
}
}
-void abstract_semaphore_notify (AbstractSemaphore* self) {
+void
+abstract_semaphore_notify (AbstractSemaphore* self)
+{
AbstractSemaphoreNotifyAction action = 0;
AbstractSemaphoreNotifyAction _tmp0_;
- AbstractSemaphoreNotifyAction _tmp1_;
#line 43 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (IS_ABSTRACT_SEMAPHORE (self));
#line 44 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_lock (&self->priv->mutex);
#line 46 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = abstract_semaphore_do_notify (self);
-#line 46 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- action = _tmp0_;
+ action = abstract_semaphore_do_notify (self);
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp1_ = action;
+ _tmp0_ = action;
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- switch (_tmp1_) {
+ switch (_tmp0_) {
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
case ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE:
-#line 332 "Semaphore.c"
+#line 330 "Semaphore.c"
{
#line 50 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
break;
-#line 336 "Semaphore.c"
+#line 334 "Semaphore.c"
}
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
case ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL:
-#line 340 "Semaphore.c"
+#line 338 "Semaphore.c"
{
#line 53 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_trigger (self);
#line 54 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
break;
-#line 346 "Semaphore.c"
+#line 344 "Semaphore.c"
}
default:
{
- AbstractSemaphoreNotifyAction _tmp2_;
- GEnumValue* _tmp3_;
+ AbstractSemaphoreNotifyAction _tmp1_;
+ GEnumValue* _tmp2_;
#line 57 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp2_ = action;
+ _tmp1_ = action;
#line 57 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp3_ = g_enum_get_value (g_type_class_ref (ABSTRACT_SEMAPHORE_TYPE_NOTIFY_ACTION), _tmp2_);
+ _tmp2_ = g_enum_get_value (g_type_class_ref (ABSTRACT_SEMAPHORE_TYPE_NOTIFY_ACTION), _tmp1_);
#line 57 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- g_error ("Semaphore.vala:57: Unknown semaphore action: %s", (_tmp3_ != NULL) ? _tmp3_->value_name : NULL);
-#line 358 "Semaphore.c"
+ g_error ("Semaphore.vala:57: Unknown semaphore action: %s", (_tmp2_ != NULL) ? _tmp2_->value_name : NULL);
+#line 356 "Semaphore.c"
}
}
#line 60 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_unlock (&self->priv->mutex);
-#line 363 "Semaphore.c"
+#line 361 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction abstract_semaphore_real_do_notify (AbstractSemaphore* self) {
+static AbstractSemaphoreNotifyAction
+abstract_semaphore_real_do_notify (AbstractSemaphore* self)
+{
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_critical ("Type `%s' does not implement abstract method `abstract_semaphore_do_notify'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -372,28 +372,28 @@ static AbstractSemaphoreNotifyAction abstract_semaphore_real_do_notify (Abstract
}
-AbstractSemaphoreNotifyAction abstract_semaphore_do_notify (AbstractSemaphore* self) {
+AbstractSemaphoreNotifyAction
+abstract_semaphore_do_notify (AbstractSemaphore* self)
+{
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), 0);
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return ABSTRACT_SEMAPHORE_GET_CLASS (self)->do_notify (self);
-#line 381 "Semaphore.c"
+#line 383 "Semaphore.c"
}
-void abstract_semaphore_wait (AbstractSemaphore* self) {
+void
+abstract_semaphore_wait (AbstractSemaphore* self)
+{
#line 66 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (IS_ABSTRACT_SEMAPHORE (self));
#line 67 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_lock (&self->priv->mutex);
#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
while (TRUE) {
-#line 392 "Semaphore.c"
- AbstractSemaphoreWaitAction _tmp0_;
-#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = abstract_semaphore_do_wait (self);
#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- if (!(_tmp0_ == ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP)) {
+ if (!(abstract_semaphore_do_wait (self) == ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP)) {
#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
break;
#line 400 "Semaphore.c"
@@ -408,163 +408,195 @@ void abstract_semaphore_wait (AbstractSemaphore* self) {
}
-static AbstractSemaphoreWaitAction abstract_semaphore_real_do_wait (AbstractSemaphore* self) {
+static AbstractSemaphoreWaitAction
+abstract_semaphore_real_do_wait (AbstractSemaphore* self)
+{
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_critical ("Type `%s' does not implement abstract method `abstract_semaphore_do_wait'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return 0;
-#line 417 "Semaphore.c"
+#line 419 "Semaphore.c"
}
-AbstractSemaphoreWaitAction abstract_semaphore_do_wait (AbstractSemaphore* self) {
+AbstractSemaphoreWaitAction
+abstract_semaphore_do_wait (AbstractSemaphore* self)
+{
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), 0);
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return ABSTRACT_SEMAPHORE_GET_CLASS (self)->do_wait (self);
-#line 426 "Semaphore.c"
+#line 430 "Semaphore.c"
}
-gboolean abstract_semaphore_reset (AbstractSemaphore* self) {
+gboolean
+abstract_semaphore_reset (AbstractSemaphore* self)
+{
gboolean result = FALSE;
gboolean is_reset = FALSE;
- gboolean _tmp0_;
#line 79 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), FALSE);
#line 80 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_lock (&self->priv->mutex);
#line 81 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = abstract_semaphore_do_reset (self);
-#line 81 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- is_reset = _tmp0_;
+ is_reset = abstract_semaphore_do_reset (self);
#line 82 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_unlock (&self->priv->mutex);
#line 84 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = is_reset;
#line 84 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 448 "Semaphore.c"
+#line 451 "Semaphore.c"
}
-static gboolean abstract_semaphore_real_do_reset (AbstractSemaphore* self) {
+static gboolean
+abstract_semaphore_real_do_reset (AbstractSemaphore* self)
+{
gboolean result = FALSE;
#line 90 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = FALSE;
#line 90 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 458 "Semaphore.c"
+#line 463 "Semaphore.c"
}
-gboolean abstract_semaphore_do_reset (AbstractSemaphore* self) {
+gboolean
+abstract_semaphore_do_reset (AbstractSemaphore* self)
+{
#line 89 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), FALSE);
#line 89 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return ABSTRACT_SEMAPHORE_GET_CLASS (self)->do_reset (self);
-#line 467 "Semaphore.c"
+#line 474 "Semaphore.c"
}
-static void value_abstract_semaphore_init (GValue* value) {
+static void
+value_abstract_semaphore_init (GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 474 "Semaphore.c"
+#line 483 "Semaphore.c"
}
-static void value_abstract_semaphore_free_value (GValue* value) {
+static void
+value_abstract_semaphore_free_value (GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (value->data[0].v_pointer) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_unref (value->data[0].v_pointer);
-#line 483 "Semaphore.c"
+#line 494 "Semaphore.c"
}
}
-static void value_abstract_semaphore_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_abstract_semaphore_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (src_value->data[0].v_pointer) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
dest_value->data[0].v_pointer = abstract_semaphore_ref (src_value->data[0].v_pointer);
-#line 493 "Semaphore.c"
+#line 507 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
dest_value->data[0].v_pointer = NULL;
-#line 497 "Semaphore.c"
+#line 511 "Semaphore.c"
}
}
-static gpointer value_abstract_semaphore_peek_pointer (const GValue* value) {
+static gpointer
+value_abstract_semaphore_peek_pointer (const GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return value->data[0].v_pointer;
-#line 505 "Semaphore.c"
+#line 521 "Semaphore.c"
}
-static gchar* value_abstract_semaphore_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_abstract_semaphore_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (collect_values[0].v_pointer) {
-#line 512 "Semaphore.c"
+#line 533 "Semaphore.c"
AbstractSemaphore * object;
object = collect_values[0].v_pointer;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (object->parent_instance.g_class == NULL) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 519 "Semaphore.c"
+#line 540 "Semaphore.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 523 "Semaphore.c"
+#line 544 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = abstract_semaphore_ref (object);
-#line 527 "Semaphore.c"
+#line 548 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 531 "Semaphore.c"
+#line 552 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return NULL;
-#line 535 "Semaphore.c"
+#line 556 "Semaphore.c"
}
-static gchar* value_abstract_semaphore_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_abstract_semaphore_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
AbstractSemaphore ** object_p;
object_p = collect_values[0].v_pointer;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (!object_p) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 546 "Semaphore.c"
+#line 572 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (!value->data[0].v_pointer) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
*object_p = NULL;
-#line 552 "Semaphore.c"
+#line 578 "Semaphore.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
*object_p = value->data[0].v_pointer;
-#line 556 "Semaphore.c"
+#line 582 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
*object_p = abstract_semaphore_ref (value->data[0].v_pointer);
-#line 560 "Semaphore.c"
+#line 586 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return NULL;
-#line 564 "Semaphore.c"
+#line 590 "Semaphore.c"
}
-GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_abstract_semaphore (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecAbstractSemaphore* spec;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_ABSTRACT_SEMAPHORE), NULL);
@@ -574,20 +606,25 @@ GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick,
G_PARAM_SPEC (spec)->value_type = object_type;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return G_PARAM_SPEC (spec);
-#line 578 "Semaphore.c"
+#line 610 "Semaphore.c"
}
-gpointer value_get_abstract_semaphore (const GValue* value) {
+gpointer
+value_get_abstract_semaphore (const GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ABSTRACT_SEMAPHORE), NULL);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return value->data[0].v_pointer;
-#line 587 "Semaphore.c"
+#line 621 "Semaphore.c"
}
-void value_set_abstract_semaphore (GValue* value, gpointer v_object) {
+void
+value_set_abstract_semaphore (GValue* value,
+ gpointer v_object)
+{
AbstractSemaphore * old;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ABSTRACT_SEMAPHORE));
@@ -603,22 +640,25 @@ void value_set_abstract_semaphore (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_ref (value->data[0].v_pointer);
-#line 607 "Semaphore.c"
+#line 644 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 611 "Semaphore.c"
+#line 648 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (old) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_unref (old);
-#line 617 "Semaphore.c"
+#line 654 "Semaphore.c"
}
}
-void value_take_abstract_semaphore (GValue* value, gpointer v_object) {
+void
+value_take_abstract_semaphore (GValue* value,
+ gpointer v_object)
+{
AbstractSemaphore * old;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ABSTRACT_SEMAPHORE));
@@ -632,22 +672,24 @@ void value_take_abstract_semaphore (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = v_object;
-#line 636 "Semaphore.c"
+#line 676 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 640 "Semaphore.c"
+#line 680 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (old) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_unref (old);
-#line 646 "Semaphore.c"
+#line 686 "Semaphore.c"
}
}
-static void abstract_semaphore_class_init (AbstractSemaphoreClass * klass) {
+static void
+abstract_semaphore_class_init (AbstractSemaphoreClass * klass)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_parent_class = g_type_class_peek_parent (klass);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -660,11 +702,13 @@ static void abstract_semaphore_class_init (AbstractSemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) abstract_semaphore_real_do_wait;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_reset = (gboolean (*) (AbstractSemaphore *)) abstract_semaphore_real_do_reset;
-#line 664 "Semaphore.c"
+#line 706 "Semaphore.c"
}
-static void abstract_semaphore_instance_init (AbstractSemaphore * self) {
+static void
+abstract_semaphore_instance_init (AbstractSemaphore * self)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = ABSTRACT_SEMAPHORE_GET_PRIVATE (self);
#line 27 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -673,11 +717,13 @@ static void abstract_semaphore_instance_init (AbstractSemaphore * self) {
g_cond_init (&self->priv->monitor);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->ref_count = 1;
-#line 677 "Semaphore.c"
+#line 721 "Semaphore.c"
}
-static void abstract_semaphore_finalize (AbstractSemaphore * obj) {
+static void
+abstract_semaphore_finalize (AbstractSemaphore * obj)
+{
AbstractSemaphore * self;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore);
@@ -687,11 +733,13 @@ static void abstract_semaphore_finalize (AbstractSemaphore * obj) {
_vala_clear_GMutex (&self->priv->mutex);
#line 28 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_vala_clear_GCond (&self->priv->monitor);
-#line 691 "Semaphore.c"
+#line 737 "Semaphore.c"
}
-GType abstract_semaphore_get_type (void) {
+GType
+abstract_semaphore_get_type (void)
+{
static volatile gsize abstract_semaphore_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_abstract_semaphore_init, value_abstract_semaphore_free_value, value_abstract_semaphore_copy_value, value_abstract_semaphore_peek_pointer, "p", value_abstract_semaphore_collect_value, "p", value_abstract_semaphore_lcopy_value };
@@ -705,18 +753,22 @@ GType abstract_semaphore_get_type (void) {
}
-gpointer abstract_semaphore_ref (gpointer instance) {
+gpointer
+abstract_semaphore_ref (gpointer instance)
+{
AbstractSemaphore * self;
self = instance;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_atomic_int_inc (&self->ref_count);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return instance;
-#line 716 "Semaphore.c"
+#line 766 "Semaphore.c"
}
-void abstract_semaphore_unref (gpointer instance) {
+void
+abstract_semaphore_unref (gpointer instance)
+{
AbstractSemaphore * self;
self = instance;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -725,29 +777,35 @@ void abstract_semaphore_unref (gpointer instance) {
ABSTRACT_SEMAPHORE_GET_CLASS (self)->finalize (self);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 729 "Semaphore.c"
+#line 781 "Semaphore.c"
}
}
-Semaphore* semaphore_construct (GType object_type) {
+Semaphore*
+semaphore_construct (GType object_type)
+{
Semaphore* self = NULL;
#line 98 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (Semaphore*) abstract_semaphore_construct (object_type, ABSTRACT_SEMAPHORE_TYPE_BROADCAST);
#line 97 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 740 "Semaphore.c"
+#line 794 "Semaphore.c"
}
-Semaphore* semaphore_new (void) {
+Semaphore*
+semaphore_new (void)
+{
#line 97 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return semaphore_construct (TYPE_SEMAPHORE);
-#line 747 "Semaphore.c"
+#line 803 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore* base) {
+static AbstractSemaphoreNotifyAction
+semaphore_real_do_notify (AbstractSemaphore* base)
+{
Semaphore * self;
AbstractSemaphoreNotifyAction result = 0;
gboolean _tmp0_;
@@ -761,7 +819,7 @@ static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore
result = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE;
#line 103 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 765 "Semaphore.c"
+#line 823 "Semaphore.c"
}
#line 105 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->passed = TRUE;
@@ -769,11 +827,13 @@ static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore
result = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL;
#line 107 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 773 "Semaphore.c"
+#line 831 "Semaphore.c"
}
-static AbstractSemaphoreWaitAction semaphore_real_do_wait (AbstractSemaphore* base) {
+static AbstractSemaphoreWaitAction
+semaphore_real_do_wait (AbstractSemaphore* base)
+{
Semaphore * self;
AbstractSemaphoreWaitAction result = 0;
AbstractSemaphoreWaitAction _tmp0_ = 0;
@@ -786,21 +846,23 @@ static AbstractSemaphoreWaitAction semaphore_real_do_wait (AbstractSemaphore* ba
if (_tmp1_) {
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_READY;
-#line 790 "Semaphore.c"
+#line 850 "Semaphore.c"
} else {
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP;
-#line 794 "Semaphore.c"
+#line 854 "Semaphore.c"
}
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp0_;
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 800 "Semaphore.c"
+#line 860 "Semaphore.c"
}
-static void semaphore_class_init (SemaphoreClass * klass) {
+static void
+semaphore_class_init (SemaphoreClass * klass)
+{
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
semaphore_parent_class = g_type_class_peek_parent (klass);
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -811,30 +873,36 @@ static void semaphore_class_init (SemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_notify = (AbstractSemaphoreNotifyAction (*) (AbstractSemaphore *)) semaphore_real_do_notify;
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) semaphore_real_do_wait;
-#line 815 "Semaphore.c"
+#line 877 "Semaphore.c"
}
-static void semaphore_instance_init (Semaphore * self) {
+static void
+semaphore_instance_init (Semaphore * self)
+{
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = SEMAPHORE_GET_PRIVATE (self);
#line 95 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->passed = FALSE;
-#line 824 "Semaphore.c"
+#line 888 "Semaphore.c"
}
-static void semaphore_finalize (AbstractSemaphore * obj) {
+static void
+semaphore_finalize (AbstractSemaphore * obj)
+{
Semaphore * self;
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SEMAPHORE, Semaphore);
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
ABSTRACT_SEMAPHORE_CLASS (semaphore_parent_class)->finalize (obj);
-#line 834 "Semaphore.c"
+#line 900 "Semaphore.c"
}
-GType semaphore_get_type (void) {
+GType
+semaphore_get_type (void)
+{
static volatile gsize semaphore_type_id__volatile = 0;
if (g_once_init_enter (&semaphore_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (SemaphoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) semaphore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Semaphore), 0, (GInstanceInitFunc) semaphore_instance_init, NULL };
@@ -846,29 +914,33 @@ GType semaphore_get_type (void) {
}
-CountdownSemaphore* countdown_semaphore_construct (GType object_type, gint total) {
+CountdownSemaphore*
+countdown_semaphore_construct (GType object_type,
+ gint total)
+{
CountdownSemaphore* self = NULL;
- gint _tmp0_;
#line 120 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (CountdownSemaphore*) abstract_semaphore_construct (object_type, ABSTRACT_SEMAPHORE_TYPE_BROADCAST);
#line 122 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = total;
-#line 122 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- self->priv->total = _tmp0_;
+ self->priv->total = total;
#line 119 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 861 "Semaphore.c"
+#line 929 "Semaphore.c"
}
-CountdownSemaphore* countdown_semaphore_new (gint total) {
+CountdownSemaphore*
+countdown_semaphore_new (gint total)
+{
#line 119 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return countdown_semaphore_construct (TYPE_COUNTDOWN_SEMAPHORE, total);
-#line 868 "Semaphore.c"
+#line 938 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (AbstractSemaphore* base) {
+static AbstractSemaphoreNotifyAction
+countdown_semaphore_real_do_notify (AbstractSemaphore* base)
+{
CountdownSemaphore * self;
AbstractSemaphoreNotifyAction result = 0;
gint _tmp0_;
@@ -885,7 +957,7 @@ static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (Abstrac
_tmp1_ = self->priv->total;
#line 126 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (_tmp0_ >= _tmp1_) {
-#line 889 "Semaphore.c"
+#line 961 "Semaphore.c"
gint _tmp2_;
gint _tmp3_;
#line 127 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -894,7 +966,7 @@ static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (Abstrac
_tmp3_ = self->priv->total;
#line 127 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_critical ("Semaphore.vala:127: CountdownSemaphore overrun: %d/%d", _tmp2_ + 1, _tmp3_);
-#line 898 "Semaphore.c"
+#line 970 "Semaphore.c"
}
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp5_ = self->priv->passed;
@@ -908,21 +980,23 @@ static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (Abstrac
if (_tmp6_ >= _tmp7_) {
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp4_ = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL;
-#line 912 "Semaphore.c"
+#line 984 "Semaphore.c"
} else {
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp4_ = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE;
-#line 916 "Semaphore.c"
+#line 988 "Semaphore.c"
}
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp4_;
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 922 "Semaphore.c"
+#line 994 "Semaphore.c"
}
-static AbstractSemaphoreWaitAction countdown_semaphore_real_do_wait (AbstractSemaphore* base) {
+static AbstractSemaphoreWaitAction
+countdown_semaphore_real_do_wait (AbstractSemaphore* base)
+{
CountdownSemaphore * self;
AbstractSemaphoreWaitAction result = 0;
AbstractSemaphoreWaitAction _tmp0_ = 0;
@@ -938,21 +1012,23 @@ static AbstractSemaphoreWaitAction countdown_semaphore_real_do_wait (AbstractSem
if (_tmp1_ < _tmp2_) {
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP;
-#line 942 "Semaphore.c"
+#line 1016 "Semaphore.c"
} else {
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_READY;
-#line 946 "Semaphore.c"
+#line 1020 "Semaphore.c"
}
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp0_;
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 952 "Semaphore.c"
+#line 1026 "Semaphore.c"
}
-static void countdown_semaphore_class_init (CountdownSemaphoreClass * klass) {
+static void
+countdown_semaphore_class_init (CountdownSemaphoreClass * klass)
+{
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
countdown_semaphore_parent_class = g_type_class_peek_parent (klass);
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -963,30 +1039,36 @@ static void countdown_semaphore_class_init (CountdownSemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_notify = (AbstractSemaphoreNotifyAction (*) (AbstractSemaphore *)) countdown_semaphore_real_do_notify;
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) countdown_semaphore_real_do_wait;
-#line 967 "Semaphore.c"
+#line 1043 "Semaphore.c"
}
-static void countdown_semaphore_instance_init (CountdownSemaphore * self) {
+static void
+countdown_semaphore_instance_init (CountdownSemaphore * self)
+{
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = COUNTDOWN_SEMAPHORE_GET_PRIVATE (self);
#line 117 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->passed = 0;
-#line 976 "Semaphore.c"
+#line 1054 "Semaphore.c"
}
-static void countdown_semaphore_finalize (AbstractSemaphore * obj) {
+static void
+countdown_semaphore_finalize (AbstractSemaphore * obj)
+{
CountdownSemaphore * self;
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_COUNTDOWN_SEMAPHORE, CountdownSemaphore);
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
ABSTRACT_SEMAPHORE_CLASS (countdown_semaphore_parent_class)->finalize (obj);
-#line 986 "Semaphore.c"
+#line 1066 "Semaphore.c"
}
-GType countdown_semaphore_get_type (void) {
+GType
+countdown_semaphore_get_type (void)
+{
static volatile gsize countdown_semaphore_type_id__volatile = 0;
if (g_once_init_enter (&countdown_semaphore_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (CountdownSemaphoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) countdown_semaphore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CountdownSemaphore), 0, (GInstanceInitFunc) countdown_semaphore_instance_init, NULL };
@@ -998,24 +1080,30 @@ GType countdown_semaphore_get_type (void) {
}
-EventSemaphore* event_semaphore_construct (GType object_type) {
+EventSemaphore*
+event_semaphore_construct (GType object_type)
+{
EventSemaphore* self = NULL;
#line 141 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (EventSemaphore*) abstract_semaphore_construct (object_type, ABSTRACT_SEMAPHORE_TYPE_BROADCAST);
#line 140 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 1008 "Semaphore.c"
+#line 1092 "Semaphore.c"
}
-EventSemaphore* event_semaphore_new (void) {
+EventSemaphore*
+event_semaphore_new (void)
+{
#line 140 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return event_semaphore_construct (TYPE_EVENT_SEMAPHORE);
-#line 1015 "Semaphore.c"
+#line 1101 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction event_semaphore_real_do_notify (AbstractSemaphore* base) {
+static AbstractSemaphoreNotifyAction
+event_semaphore_real_do_notify (AbstractSemaphore* base)
+{
EventSemaphore * self;
AbstractSemaphoreNotifyAction result = 0;
#line 144 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -1026,11 +1114,13 @@ static AbstractSemaphoreNotifyAction event_semaphore_real_do_notify (AbstractSem
result = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL;
#line 147 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 1030 "Semaphore.c"
+#line 1118 "Semaphore.c"
}
-static AbstractSemaphoreWaitAction event_semaphore_real_do_wait (AbstractSemaphore* base) {
+static AbstractSemaphoreWaitAction
+event_semaphore_real_do_wait (AbstractSemaphore* base)
+{
EventSemaphore * self;
AbstractSemaphoreWaitAction result = 0;
AbstractSemaphoreWaitAction _tmp0_ = 0;
@@ -1043,21 +1133,23 @@ static AbstractSemaphoreWaitAction event_semaphore_real_do_wait (AbstractSemapho
if (_tmp1_) {
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_READY;
-#line 1047 "Semaphore.c"
+#line 1137 "Semaphore.c"
} else {
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP;
-#line 1051 "Semaphore.c"
+#line 1141 "Semaphore.c"
}
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp0_;
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 1057 "Semaphore.c"
+#line 1147 "Semaphore.c"
}
-static gboolean event_semaphore_real_do_reset (AbstractSemaphore* base) {
+static gboolean
+event_semaphore_real_do_reset (AbstractSemaphore* base)
+{
EventSemaphore * self;
gboolean result = FALSE;
#line 154 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -1068,11 +1160,13 @@ static gboolean event_semaphore_real_do_reset (AbstractSemaphore* base) {
result = TRUE;
#line 157 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 1072 "Semaphore.c"
+#line 1164 "Semaphore.c"
}
-static void event_semaphore_class_init (EventSemaphoreClass * klass) {
+static void
+event_semaphore_class_init (EventSemaphoreClass * klass)
+{
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
event_semaphore_parent_class = g_type_class_peek_parent (klass);
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -1085,30 +1179,36 @@ static void event_semaphore_class_init (EventSemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) event_semaphore_real_do_wait;
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_reset = (gboolean (*) (AbstractSemaphore *)) event_semaphore_real_do_reset;
-#line 1089 "Semaphore.c"
+#line 1183 "Semaphore.c"
}
-static void event_semaphore_instance_init (EventSemaphore * self) {
+static void
+event_semaphore_instance_init (EventSemaphore * self)
+{
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = EVENT_SEMAPHORE_GET_PRIVATE (self);
#line 138 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->fired = FALSE;
-#line 1098 "Semaphore.c"
+#line 1194 "Semaphore.c"
}
-static void event_semaphore_finalize (AbstractSemaphore * obj) {
+static void
+event_semaphore_finalize (AbstractSemaphore * obj)
+{
EventSemaphore * self;
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EVENT_SEMAPHORE, EventSemaphore);
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
ABSTRACT_SEMAPHORE_CLASS (event_semaphore_parent_class)->finalize (obj);
-#line 1108 "Semaphore.c"
+#line 1206 "Semaphore.c"
}
-GType event_semaphore_get_type (void) {
+GType
+event_semaphore_get_type (void)
+{
static volatile gsize event_semaphore_type_id__volatile = 0;
if (g_once_init_enter (&event_semaphore_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (EventSemaphoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_semaphore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventSemaphore), 0, (GInstanceInitFunc) event_semaphore_instance_init, NULL };
@@ -1120,7 +1220,9 @@ GType event_semaphore_get_type (void) {
}
-static void _vala_clear_GMutex (GMutex * mutex) {
+static void
+_vala_clear_GMutex (GMutex * mutex)
+{
GMutex zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GMutex))) {
g_mutex_clear (mutex);
@@ -1129,7 +1231,9 @@ static void _vala_clear_GMutex (GMutex * mutex) {
}
-static void _vala_clear_GRecMutex (GRecMutex * mutex) {
+static void
+_vala_clear_GRecMutex (GRecMutex * mutex)
+{
GRecMutex zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GRecMutex))) {
g_rec_mutex_clear (mutex);
@@ -1138,7 +1242,9 @@ static void _vala_clear_GRecMutex (GRecMutex * mutex) {
}
-static void _vala_clear_GRWLock (GRWLock * mutex) {
+static void
+_vala_clear_GRWLock (GRWLock * mutex)
+{
GRWLock zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GRWLock))) {
g_rw_lock_clear (mutex);
@@ -1147,7 +1253,9 @@ static void _vala_clear_GRWLock (GRWLock * mutex) {
}
-static void _vala_clear_GCond (GCond * mutex) {
+static void
+_vala_clear_GCond (GCond * mutex)
+{
GCond zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GCond))) {
g_cond_clear (mutex);