Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE2XoE9g_Vahs6uPEdYPCkeCsYaj+Ff7oV12jRc07Z4pGpbm2A@mail.gmail.com>
Date: Wed, 24 Sep 2025 03:24:53 +0800
From: 罗勇刚(Yonggang Luo) <luoyonggang@...il.com>
To: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH 4/4] c2y: Add monotonic timed wait support for threads mtx cnd

On Tue, Jun 20, 2023 at 4:51 PM Jₑₙₛ Gustedt <jens.gustedt@...ia.fr> wrote:
>
> Hello,
>
> On Tue, 20 Jun 2023 15:53:42 +0800, 罗勇刚(Yonggang Luo) wrote:
>
> > I'd like to receive some feedback of the function names
> > mtx_timedlock_monotonic
> > cnd_timedwait_monotonic
>
> I find such interfaces too specific.
>
> > is properly as a proposal for c2y(the next standard after c23).
>
> I'd much prefer an interface that just adds the time base as a
> parameter, similar to `pthread_cond_clockdwait` or so, perhaps named
> `cnd_timedwait_base`.

the prototype of pthread_cond_clockwait is
```c

int pthread_cond_clockwait(
            pthread_cond_t *cond,
            pthread_mutex_t *mutex,
            clockid_t clk,
            const struct timespec *abstime );

```

So maybe
```c
int cnd_timedwait_base( cnd_t* restrict cond, mtx_t* restrict mutex,
                                        const struct timespec*
restrict time_point, int base);
```
>
> That would be much easier to standardize. Just take an existing POSIX
> interface, adapt from POSIX clocks to time bases, use a name that fits
> into the C naming scheme, and copy over and adapt the description.
>
> Thanks
> Jₑₙₛ
>
>
> --
> :: ICube :::::::::::::::::::::::::::::: deputy director ::
> :: Université de Strasbourg :::::::::::::::::::::: ICPS ::
> :: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
> :: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
> :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::



-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.