[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module
From: |
Jim Meyering |
Subject: |
Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module |
Date: |
Mon, 24 Nov 2003 07:53:20 +0100 |
Paul Eggert <address@hidden> wrote:
> Bruno Haible <address@hidden> writes:
>
>> The vast majority of GNU packages so far is single-threaded. We make things
>> easy for the majority; it's not a useful policy (in the sense of "worse is
>> better") to make things complicated for the majority just to serve a minority
>> and a theoretical argument.
>
> Conversely, one could argue that gnulib should default to safe mode,
> and should use unlocked-IO only when the user says "Yes, I know that
> my code is single-threaded".
>
> Ideally gnulib would do this automatically: it would detect that the
> app is multithreaded and would disable unlocked-IO. If a package had
> some multithreaded apps and some unithreaded apps, that would work too.
> I don't know how to do that easily, though.
>
> Perhaps the simplest fix for now is to add a new macro
> gl_FUNC_GLIBC_UNLOCKED_IO that defaults to not using unlocked io, but
> uses unlocked io if it is given an argument of 1. The existing
> jm_FUNC_GLIBC_UNLOCKED_IO would be equivalent to
> gl_FUNC_GLIBC_UNLOCKED_IO(1). This would be a signal to the user that
> one has to decide whether any app might be multithreaded.
I like that.
If you implement this, you're welcome to change
the `jm_' prefix to `gl_' while you're at it.
- [Bug-gnulib] requirements of 'unlocked-io' module, Bruno Haible, 2003/11/20
- [Bug-gnulib] Re: requirements of 'unlocked-io' module, Simon Josefsson, 2003/11/21
- Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module, Bruno Haible, 2003/11/21
- Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module, Paul Eggert, 2003/11/24
- Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module,
Jim Meyering <=
- Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module, Bruno Haible, 2003/11/24
- Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module, Jim Meyering, 2003/11/24
- Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module, Paul Eggert, 2003/11/24
- Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module, Bruno Haible, 2003/11/24