bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new module 'once'


From: Bruno Haible
Subject: new module 'once'
Date: Mon, 05 Aug 2024 00:03:50 +0200

The gnulib module 'lock' contain both locking and once-only facilities.

Sometimes only the once-only facility is needed. In this case it is
not necessary to ship the source code for locks, read-write locks, and
recursive locks.

To achieve this, here is a patch set that creates a module 'once'.
(Similar to 'call_once' for ISO C or 'pthread-once' for POSIX.)


2024-08-04  Bruno Haible  <bruno@clisp.org>

        mtx-tests: Reduce dependencies.
        * tests/test-mtx.c: Don't include glthread/lock.h.
        * modules/mtx-tests (Depends-on): Remove lock.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        thread: Reduce dependencies.
        * lib/glthread/thread.c: Don't include glthread/lock.h.
        * modules/thread (Depends-on): Remove lock.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        uchar-c23: Reduce dependencies.
        * lib/lc-charset-unicode.c: Include glthread/once.h instead of
        glthread/lock.h.
        * modules/uchar-c23 (Depends-on): Add once. Remove lock.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        strsignal: Reduce dependencies.
        * lib/strsignal.c: Include glthread/once.h instead of glthread/lock.h.
        * modules/strsignal (Depends-on): Add once. Remove lock.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        immutable: Clarify dependencies.
        * lib/immutable.c: Include glthread/once.h instead of glthread/lock.h.
        * modules/immutable (Depends-on): Add once.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        fstrcmp: Reduce dependencies.
        * lib/fstrcmp.c: Include glthread/once.h instead of glthread/lock.h.
        * modules/fstrcmp (Depends-on): Add once. Remove lock.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        lock-tests: Clarify dependencies.
        * tests/test-lock.c: Include glthread/once.h.
        * modules/lock-tests (Depends-on): Add once.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        fatal-signal: Clarify dependencies.
        * lib/fatal-signal.c: Include glthread/once.h.
        * modules/fatal-signal (Depends-on): Add once.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        clean-temp-simple: Clarify dependencies.
        * lib/clean-temp-simple.c: Include glthread/once.h.
        * modules/clean-temp-simple (Depends-on): Add once.

2024-08-04  Bruno Haible  <bruno@clisp.org>

        once-tests: New module, extracted from lock-tests.
        * modules/once-tests: New file.
        * modules/lock-tests (Files): Remove tests/test-once.c.
        (Makefile.am): Don't build and test test-once1 and test-once2.

        once: New module, extracted from lock.
        * lib/glthread/once.h: New file, extracted from lib/glthread/lock.h.
        * lib/glthread/once.c: New file, extracted from lib/glthread/lock.c.
        * lib/glthread/lock.h: Include glthread/once.h. Don't include
        windows-once.h.
        (c11_threads_in_use, glthread_in_use, gl_once_t, gl_once_define,
        glthread_once): Remove.
        (glthread_once_singlethreaded, glthread_once_multithreaded): Remove
        declarations.
        * lib/glthread/lock.c (fresh_once, glthread_once_singlethreaded,
        glthread_once_multithreaded): Remove.
        * modules/once: New file.
        * modules/lock (Depends-on): Add once. Remove pthread-once,
        windows-once.
        * tests/test-once.c: Include glthread/once.h instead of glthread/lock.h.
        * doc/multithread.texi (Gnulib multithreading): Mention the module
        'once'.

Attachment: 0001-once-New-module-extracted-from-lock.patch
Description: Text Data

Attachment: 0002-once-tests-New-module-extracted-from-lock-tests.patch
Description: Text Data

Attachment: 0003-clean-temp-simple-Clarify-dependencies.patch
Description: Text Data

Attachment: 0004-fatal-signal-Clarify-dependencies.patch
Description: Text Data

Attachment: 0005-lock-tests-Clarify-dependencies.patch
Description: Text Data

Attachment: 0006-fstrcmp-Reduce-dependencies.patch
Description: Text Data

Attachment: 0007-immutable-Clarify-dependencies.patch
Description: Text Data

Attachment: 0008-strsignal-Reduce-dependencies.patch
Description: Text Data

Attachment: 0009-uchar-c23-Reduce-dependencies.patch
Description: Text Data

Attachment: 0010-thread-Reduce-dependencies.patch
Description: Text Data

Attachment: 0011-mtx-tests-Reduce-dependencies.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]