public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Thomas Preudhomme <thomas.preudhomme@foss.arm.com>
To: newlib@sourceware.org, Freddie Chopin <freddie_chopin@op.pl>
Subject: Re: [PATCH, newlib] Allow locking routine to be retargeted
Date: Fri, 20 Jan 2017 13:37:00 -0000	[thread overview]
Message-ID: <4f0be40a-dd11-7d83-690b-717e832b45d2@foss.arm.com> (raw)
In-Reply-To: <dae392c5-7862-94c3-8578-f88c7eb67624@foss.arm.com>

Hi Freddie,

Have you had time to work on the last version of the patch?

Best regards,

Thomas

On 16/01/17 15:59, Thomas Preudhomme wrote:
> Please find attached the updated patch.
>
> I've noticed that there is also some target and OS specific locks:
> _arc4random_mutex and many Linux/rtems/tirtos specific locks.
>
> I haven't included those.
>
> Best regards,
>
> Thomas
>
> On 13/01/17 18:16, Thomas Preudhomme wrote:
>>
>>
>> On 13/01/17 18:05, Freddie Chopin wrote:
>>> On Fri, 2017-01-13 at 13:24 +0000, Thomas Preudhomme wrote:
>>>> And here's the patch. Tested with full and partial retargeting as
>>>> well as no
>>>> retargeting.
>>>
>>> I confirm - if I provide just some of the functions/objects, the
>>> linking will fail with "multiple definition" error. Great!
>>>
>>> Any chance for adding all locks used by newlib internally? These 4 are
>>> missing from what I've seen:
>>> newlib/libc/posix/telldir.c:__LOCK_INIT(static, dd_hash_lock);
>>> newlib/libc/time/tzlock.c:__LOCK_INIT(static, __tz_lock_object);
>>> newlib/libc/stdlib/quick_exit.c:__LOCK_INIT(static, atexit_mutex);
>>> newlib/libc/stdlib/envlock.c:__LOCK_INIT_RECURSIVE(static, __env_lock_object);
>>>
>>> I know these are not "popular", but nevertheless required. For example
>>> time-zone locking is pulled by any function dealing with "local" time,
>>> like a very useful mktime(). 4 bytes here or there is not such a big
>>> deal (;
>>
>> Oh yes absolutely. I forgot that I added the lock only based on testing rather
>> than analysis of the code. Thanks for pointing that out.
>>
>> Best regards,
>>
>> Thomas

  reply	other threads:[~2017-01-20 13:37 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 17:18 Thomas Preudhomme
2016-12-13 20:13 ` Freddie Chopin
2016-12-14 11:54   ` Thomas Preudhomme
2016-12-14 12:39     ` Freddie Chopin
2017-01-11 13:09       ` Thomas Preudhomme
2016-12-13 21:11 ` Freddie Chopin
2016-12-13 21:41 ` Freddie Chopin
2016-12-14 14:22 ` Sebastian Huber
2016-12-14 14:36   ` Thomas Preudhomme
2016-12-14 14:52     ` Thomas Preudhomme
2017-01-09 18:49       ` Freddie Chopin
2017-01-10 16:50         ` Thomas Preudhomme
2017-01-10 17:07           ` Freddie Chopin
2017-01-11 16:09             ` Thomas Preudhomme
2017-01-11 16:46               ` Craig Howland
2017-01-11 17:48                 ` Thomas Preudhomme
2017-01-11 18:08                   ` Craig Howland
2017-01-11 19:14                   ` Freddie Chopin
2017-01-12 10:52                     ` Thomas Preudhomme
2017-01-12 16:20                       ` Freddie Chopin
2017-01-12 16:55                         ` Thomas Preudhomme
2017-01-13 11:25                           ` Thomas Preudhomme
2017-01-13 13:24                             ` Thomas Preudhomme
2017-01-13 18:05                               ` Freddie Chopin
2017-01-13 18:16                                 ` Thomas Preudhomme
2017-01-16 15:59                                   ` Thomas Preudhomme
2017-01-20 13:37                                     ` Thomas Preudhomme [this message]
2017-01-20 13:55                                       ` Freddie Chopin
2017-01-24 10:00                                       ` Freddie Chopin
2017-01-25 12:31                                         ` Corinna Vinschen
2017-01-30 10:51                                         ` Thomas Preudhomme
2016-12-14 15:27     ` Freddie Chopin
  -- strict thread matches above, loose matches on Subject: below --
2016-11-10 14:42 Thomas Preudhomme
2016-11-10 15:34 ` Freddie Chopin
2016-11-10 16:05   ` Thomas Preudhomme
2016-11-10 20:32     ` Freddie Chopin
2016-11-10 20:35       ` Freddie Chopin
2016-11-11 11:09       ` Thomas Preudhomme
2016-11-11 11:54         ` Freddie Chopin
2016-11-11 11:56         ` Sebastian Huber
2016-11-11 13:40           ` Thomas Preudhomme
2016-11-11 14:10             ` Freddie Chopin
2016-11-23 14:38           ` Thomas Preudhomme
2016-11-23 15:52             ` Freddie Chopin
2016-11-24  7:44             ` Sebastian Huber
2016-11-24  8:29               ` Freddie Chopin
2016-11-25 10:21               ` Thomas Preudhomme
2016-11-25 12:04                 ` Thomas Preudhomme
2016-11-25 12:35                   ` Sebastian Huber
2016-12-13 17:20                     ` Thomas Preudhomme
2016-11-25 14:12                   ` Freddie Chopin

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=4f0be40a-dd11-7d83-690b-717e832b45d2@foss.arm.com \
    --to=thomas.preudhomme@foss.arm.com \
    --cc=freddie_chopin@op.pl \
    --cc=newlib@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).