Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support
Date: Tue, 14 May 2013 14:07:01 +0200	[thread overview]
Message-ID: <20130514140701.2ff7178d@skate> (raw)
In-Reply-To: <1368532631-12983-2-git-send-email-s.martin49@gmail.com>

Dear Samuel Martin,

On Tue, 14 May 2013 13:57:10 +0200, Samuel Martin wrote:

> +---
> +--- a/gio/gcancellable.c	2013-05-14 10:49:10.656384566 +0200
> ++++ b/gio/gcancellable.c	2013-05-14 12:38:46.339432786 +0200
> +@@ -263,6 +263,7 @@ g_cancellable_reset (GCancellable *cance
> + 
> +   g_return_if_fail (G_IS_CANCELLABLE (cancellable));
> + 
> ++#ifdef G_THREADS_ENABLED
> +   G_LOCK(cancellable);
> + 
> +   priv = cancellable->priv;
> +@@ -282,6 +283,7 @@ g_cancellable_reset (GCancellable *cance
> +       priv->cancelled = FALSE;
> +     }
> +   G_UNLOCK(cancellable);
> ++#endif
> + }
> + 
> + /**
> +@@ -612,6 +614,9 @@ g_cancellable_disconnect (GCancellable
> +   if (handler_id == 0 ||  cancellable == NULL)
> +     return;
> + 
> ++  g_return_if_fail (G_IS_CANCELLABLE (cancellable));
> ++
> ++#ifdef G_THREADS_ENABLED
> +   G_LOCK (cancellable);
> + 
> +   priv = cancellable->priv;
> +@@ -625,6 +630,7 @@ g_cancellable_disconnect (GCancellable
> + 
> +   g_signal_handler_disconnect (cancellable, handler_id);
> +   G_UNLOCK (cancellable);
> ++#endif
> + }


Are you sure about this patch? It completely removes the behavior of
the cancellation functions of glib, which may be used even if there are
no threads.

Are you sure that what needs to be removed is not just the G_LOCK() and
G_UNLOCK() calls ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-05-14 12:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14 11:57 [Buildroot] [PATCH 1/3] libglib2: rename patches Samuel Martin
2013-05-14 11:57 ` [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support Samuel Martin
2013-05-14 12:07   ` Thomas Petazzoni [this message]
2013-05-14 21:23     ` Samuel Martin
2013-05-14 11:57 ` [Buildroot] [PATCH 3/3] cairo: " Samuel Martin
2013-05-14 20:06   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130514140701.2ff7178d@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox