From 2492891f112caac6076ce49721d9d5d78a152c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 12 Nov 2017 15:53:58 +0100 Subject: New upstream version 0.26.4 --- src/threads/Workers.c | 130 +++++++++++++++++++++++++------------------------- 1 file changed, 65 insertions(+), 65 deletions(-) (limited to 'src/threads/Workers.c') diff --git a/src/threads/Workers.c b/src/threads/Workers.c index ff9d180..0391730 100644 --- a/src/threads/Workers.c +++ b/src/threads/Workers.c @@ -1,4 +1,4 @@ -/* Workers.c generated by valac 0.34.7, the Vala compiler +/* Workers.c generated by valac 0.36.6, the Vala compiler * generated from Workers.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -192,7 +192,7 @@ gint workers_get_pending_job_count (Workers* self); gboolean background_job_is_cancelled (BackgroundJob* self); void background_job_execute (BackgroundJob* self); void background_job_internal_notify_completion (BackgroundJob* self); -static void workers_finalize (Workers* obj); +static void workers_finalize (Workers * obj); static gint64 _background_job_priority_comparator_comparator (void* a, void* b, gpointer self) { @@ -261,8 +261,8 @@ static void _workers_thread_start_gfunc (gpointer data, gpointer self) { Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive) { Workers* self = NULL; gboolean _tmp0_ = FALSE; - guint _tmp1_ = 0U; - EventSemaphore* _tmp3_ = NULL; + guint _tmp1_; + EventSemaphore* _tmp3_; GError * _inner_error_ = NULL; #line 23 "/home/jens/Source/shotwell/src/threads/Workers.vala" self = (Workers*) g_type_create_instance (object_type); @@ -271,7 +271,7 @@ Workers* workers_construct (GType object_type, guint max_threads, gboolean exclu #line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala" if (_tmp1_ <= ((guint) 0)) { #line 274 "Workers.c" - guint _tmp2_ = 0U; + guint _tmp2_; #line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp2_ = max_threads; #line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -295,10 +295,10 @@ Workers* workers_construct (GType object_type, guint max_threads, gboolean exclu #line 296 "Workers.c" { GThreadPool* _tmp4_ = NULL; - guint _tmp5_ = 0U; - gboolean _tmp6_ = FALSE; - GThreadPool* _tmp7_ = NULL; - GThreadPool* _tmp8_ = NULL; + guint _tmp5_; + gboolean _tmp6_; + GThreadPool* _tmp7_; + GThreadPool* _tmp8_; #line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp5_ = max_threads; #line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -338,7 +338,7 @@ Workers* workers_construct (GType object_type, guint max_threads, gboolean exclu __catch8_g_thread_error: { GError* err = NULL; - const gchar* _tmp9_ = NULL; + const gchar* _tmp9_; #line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala" err = _inner_error_; #line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -377,14 +377,14 @@ Workers* workers_new (guint max_threads, gboolean exclusive) { guint workers_threads_per_cpu (gint per, gint max) { guint result = 0U; - gint _tmp0_ = 0; + gint _tmp0_; guint count = 0U; - guint _tmp1_ = 0U; - gint _tmp2_ = 0; + guint _tmp1_; + gint _tmp2_; guint _tmp3_ = 0U; - gint _tmp4_ = 0; - guint _tmp9_ = 0U; - guint _tmp10_ = 0U; + gint _tmp4_; + guint _tmp9_; + guint _tmp10_; #line 37 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp0_ = per; #line 37 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -400,16 +400,16 @@ guint workers_threads_per_cpu (gint per, gint max) { #line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala" if (_tmp4_ < 0) { #line 403 "Workers.c" - guint _tmp5_ = 0U; + guint _tmp5_; #line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp5_ = count; #line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp3_ = _tmp5_; #line 409 "Workers.c" } else { - guint _tmp6_ = 0U; - gint _tmp7_ = 0; - guint _tmp8_ = 0U; + guint _tmp6_; + gint _tmp7_; + guint _tmp8_; #line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp6_ = count; #line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -434,10 +434,10 @@ guint workers_threads_per_cpu (gint per, gint max) { guint workers_thread_per_cpu_minus_one (void) { guint result = 0U; - guint _tmp0_ = 0U; - guint _tmp1_ = 0U; - guint _tmp2_ = 0U; - guint _tmp3_ = 0U; + guint _tmp0_; + guint _tmp1_; + guint _tmp2_; + guint _tmp3_; #line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp0_ = g_get_num_processors (); #line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -471,7 +471,7 @@ static gint _background_job_priority_compare_func_gcompare_data_func (gconstpoin void workers_enqueue (Workers* self, BackgroundJob* job) { - EventSemaphore* _tmp0_ = NULL; + EventSemaphore* _tmp0_; GError * _inner_error_ = NULL; #line 51 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_return_if_fail (IS_WORKERS (self)); @@ -483,17 +483,17 @@ void workers_enqueue (Workers* self, BackgroundJob* job) { abstract_semaphore_reset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore)); #line 485 "Workers.c" { - GAsyncQueue* _tmp1_ = NULL; + GAsyncQueue* _tmp1_; #line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp1_ = self->priv->queue; #line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_rec_mutex_lock (&self->priv->__lock_queue); #line 492 "Workers.c" { - GAsyncQueue* _tmp2_ = NULL; - BackgroundJob* _tmp3_ = NULL; - BackgroundJob* _tmp4_ = NULL; - gint _tmp5_ = 0; + GAsyncQueue* _tmp2_; + BackgroundJob* _tmp3_; + BackgroundJob* _tmp4_; + gint _tmp5_; #line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp2_ = self->priv->queue; #line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -510,7 +510,7 @@ void workers_enqueue (Workers* self, BackgroundJob* job) { } __finally9: { - GAsyncQueue* _tmp6_ = NULL; + GAsyncQueue* _tmp6_; #line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp6_ = self->priv->queue; #line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -529,8 +529,8 @@ void workers_enqueue (Workers* self, BackgroundJob* job) { } } { - GThreadPool* _tmp7_ = NULL; - BackgroundJob* _tmp8_ = NULL; + GThreadPool* _tmp7_; + BackgroundJob* _tmp8_; #line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp7_ = self->priv->thread_pool; #line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -557,8 +557,8 @@ void workers_enqueue (Workers* self, BackgroundJob* job) { __catch10_g_thread_error: { GError* err = NULL; - GError* _tmp9_ = NULL; - const gchar* _tmp10_ = NULL; + GError* _tmp9_; + const gchar* _tmp10_; #line 59 "/home/jens/Source/shotwell/src/threads/Workers.vala" err = _inner_error_; #line 59 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -595,8 +595,8 @@ void workers_enqueue_many (Workers* self, BackgroundJobBatch* batch) { #line 596 "Workers.c" { GeeIterator* _job_it = NULL; - BackgroundJobBatch* _tmp0_ = NULL; - GeeIterator* _tmp1_ = NULL; + BackgroundJobBatch* _tmp0_; + GeeIterator* _tmp1_; #line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp0_ = batch; #line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -606,12 +606,12 @@ void workers_enqueue_many (Workers* self, BackgroundJobBatch* batch) { #line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala" while (TRUE) { #line 609 "Workers.c" - GeeIterator* _tmp2_ = NULL; - gboolean _tmp3_ = FALSE; + GeeIterator* _tmp2_; + gboolean _tmp3_; BackgroundJob* job = NULL; - GeeIterator* _tmp4_ = NULL; - gpointer _tmp5_ = NULL; - BackgroundJob* _tmp6_ = NULL; + GeeIterator* _tmp4_; + gpointer _tmp5_; + BackgroundJob* _tmp6_; #line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp2_ = _job_it; #line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -644,7 +644,7 @@ void workers_enqueue_many (Workers* self, BackgroundJobBatch* batch) { void workers_wait_for_empty_queue (Workers* self) { - EventSemaphore* _tmp0_ = NULL; + EventSemaphore* _tmp0_; #line 73 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_return_if_fail (IS_WORKERS (self)); #line 74 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -662,7 +662,7 @@ gint workers_get_pending_job_count (Workers* self) { g_return_val_if_fail (IS_WORKERS (self), 0); #line 664 "Workers.c" { - GAsyncQueue* _tmp0_ = NULL; + GAsyncQueue* _tmp0_; gint _tmp4_ = 0; #line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp0_ = self->priv->queue; @@ -670,14 +670,14 @@ gint workers_get_pending_job_count (Workers* self) { g_rec_mutex_lock (&self->priv->__lock_queue); #line 672 "Workers.c" { - gint _tmp1_ = 0; + gint _tmp1_; #line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp1_ = self->priv->enqueued; #line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala" result = _tmp1_; #line 679 "Workers.c" { - GAsyncQueue* _tmp2_ = NULL; + GAsyncQueue* _tmp2_; #line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp2_ = self->priv->queue; #line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -690,7 +690,7 @@ gint workers_get_pending_job_count (Workers* self) { } __finally11: { - GAsyncQueue* _tmp3_ = NULL; + GAsyncQueue* _tmp3_; #line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp3_ = self->priv->queue; #line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -711,24 +711,24 @@ gint workers_get_pending_job_count (Workers* self) { static void workers_thread_start (Workers* self, void* ignored) { BackgroundJob* job = NULL; gboolean empty = FALSE; - gboolean _tmp7_ = FALSE; + gboolean _tmp7_; GError * _inner_error_ = NULL; #line 84 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_return_if_fail (IS_WORKERS (self)); #line 719 "Workers.c" { - GAsyncQueue* _tmp0_ = NULL; + GAsyncQueue* _tmp0_; #line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp0_ = self->priv->queue; #line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_rec_mutex_lock (&self->priv->__lock_queue); #line 726 "Workers.c" { - GAsyncQueue* _tmp1_ = NULL; - gpointer _tmp2_ = NULL; - gint _tmp3_ = 0; - gint _tmp4_ = 0; - gint _tmp5_ = 0; + GAsyncQueue* _tmp1_; + gpointer _tmp2_; + gint _tmp3_; + gint _tmp4_; + gint _tmp5_; #line 88 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp1_ = self->priv->queue; #line 88 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -755,7 +755,7 @@ static void workers_thread_start (Workers* self, void* ignored) { } __finally12: { - GAsyncQueue* _tmp6_ = NULL; + GAsyncQueue* _tmp6_; #line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp6_ = self->priv->queue; #line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -788,7 +788,7 @@ static void workers_thread_start (Workers* self, void* ignored) { #line 100 "/home/jens/Source/shotwell/src/threads/Workers.vala" if (empty) { #line 791 "Workers.c" - EventSemaphore* _tmp8_ = NULL; + EventSemaphore* _tmp8_; #line 101 "/home/jens/Source/shotwell/src/threads/Workers.vala" _tmp8_ = self->priv->empty_event; #line 101 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -843,7 +843,7 @@ static gchar* value_workers_collect_value (GValue* value, guint n_collect_values #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" if (collect_values[0].v_pointer) { #line 846 "Workers.c" - Workers* object; + Workers * object; object = collect_values[0].v_pointer; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" if (object->parent_instance.g_class == NULL) { @@ -870,7 +870,7 @@ static gchar* value_workers_collect_value (GValue* value, guint n_collect_values static gchar* value_workers_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { - Workers** object_p; + Workers ** object_p; object_p = collect_values[0].v_pointer; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" if (!object_p) { @@ -922,7 +922,7 @@ gpointer value_get_workers (const GValue* value) { void value_set_workers (GValue* value, gpointer v_object) { - Workers* old; + Workers * old; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_WORKERS)); #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -953,7 +953,7 @@ void value_set_workers (GValue* value, gpointer v_object) { void value_take_workers (GValue* value, gpointer v_object) { - Workers* old; + Workers * old; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_WORKERS)); #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -993,8 +993,8 @@ static void workers_class_init (WorkersClass * klass) { static void workers_instance_init (Workers * self) { - GAsyncQueue* _tmp0_ = NULL; - EventSemaphore* _tmp1_ = NULL; + GAsyncQueue* _tmp0_; + EventSemaphore* _tmp1_; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" self->priv = WORKERS_GET_PRIVATE (self); #line 19 "/home/jens/Source/shotwell/src/threads/Workers.vala" @@ -1015,7 +1015,7 @@ static void workers_instance_init (Workers * self) { } -static void workers_finalize (Workers* obj) { +static void workers_finalize (Workers * obj) { Workers * self; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_WORKERS, Workers); @@ -1048,7 +1048,7 @@ GType workers_get_type (void) { gpointer workers_ref (gpointer instance) { - Workers* self; + Workers * self; self = instance; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" g_atomic_int_inc (&self->ref_count); @@ -1059,7 +1059,7 @@ gpointer workers_ref (gpointer instance) { void workers_unref (gpointer instance) { - Workers* self; + Workers * self; self = instance; #line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -- cgit v1.2.3