All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH 2/3] Use %m instead of strerror() in syslog messages
Date: Mon, 29 Nov 2010 10:28:15 +0100	[thread overview]
Message-ID: <1291022895.4795.17.camel@aeonflux> (raw)
In-Reply-To: <201011291011.10503.remi.denis-courmont@nokia.com>

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

Hi Remi,

> > > strerror() is not thread-safe, nor in the glibc implementation,
> > > nor in the POSIX specification. In my experience, it will infrequently
> > > crash when another thread uses locale data in any way, including
> > > string formatting and such...
> > > 
> > > Since the Huawei driver uses thread, we might as well avoid strerror().
> > > ---
> > > 
> > >  drivers/isimodem/sim.c |    3 ++-
> > >  plugins/hfp.c          |    4 ++--
> > >  plugins/isigen.c       |   13 ++++++++-----
> > >  plugins/n900.c         |   14 +++++++-------
> > >  plugins/nokia-gpio.c   |   29 +++++++++++++++++------------
> > >  5 files changed, 36 insertions(+), 27 deletions(-)
> > 
> > Since we do not use threads, do you still want this patch?  If you do,
> > can you please break this up into two patches, one for drivers/isimodem
> > and one for plugins?  We prefer patches to be split by directory.
> 
> Why do we initialize glib and dbus with thread support? If the plan is to 
> smoothen the hypothetical use of threads in the future, then this patch should 
> probably go in as well?

we do not initialize it with thread support, but in case a plugin
actually uses threads it could force it. This is common across BlueZ,
ConnMan and oFono and really just in case thing. In ConnMan we have this
case with the WiMAX plugin. For oFono we should hopefully never require
threading support.

Regards

Marcel



  reply	other threads:[~2010-11-29  9:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 10:51 [PATCH 1/3] Remove stray newlines in DBG and ofono log messages =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-25 10:51 ` [PATCH 2/3] Use %m instead of strerror() in syslog messages =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-25 12:12   ` Marcel Holtmann
2010-11-25 13:28     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-26 21:12   ` Denis Kenzior
2010-11-29  8:11     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-29  9:28       ` Marcel Holtmann [this message]
2010-11-25 10:51 ` [PATCH 3/3] gisi: use strerror_r() instead of strerror() =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-26 21:07   ` Denis Kenzior
2010-11-29  8:09     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-11-26 19:51 ` [PATCH 1/3] Remove stray newlines in DBG and ofono log messages Denis Kenzior

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=1291022895.4795.17.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=ofono@ofono.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.