Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #113575 > unrolled thread

Run this under Windows and Linux

Started byBonita Montero <Bonita.Montero@gmail.com>
First post2023-10-30 08:12 +0100
Last post2023-11-05 15:30 +0000
Articles 20 on this page of 151 — 7 participants

Back to article view | Back to comp.lang.c++


Contents

  Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-10-30 08:12 +0100
    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-10-30 13:08 -0700
      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-10-31 13:25 +0100
        Re: Run this under Windows and Linux Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2023-10-31 17:37 +0000
        Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-10-31 13:59 -0700
          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-01 13:00 +0100
            Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-01 19:24 +0100
              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-01 19:28 +0100
                Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-01 19:04 +0000
                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-01 20:11 +0100
                    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-01 13:02 -0700
                      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 13:36 +0100
                        Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:13 -0700
                          Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 00:19 -0700
                            Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:13 +0100
                            Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-04 15:53 +0000
                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 16:58 +0100
                              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 11:44 -0700
                                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-09 01:05 -0800
                          Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-04 16:03 +0000
                            Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 11:45 -0700
                              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 11:48 -0700
                            Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 19:58 +0100
                              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 12:14 -0700
              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-01 13:01 -0700
                Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-02 07:10 +0100
              Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-01 20:50 +0000
                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-01 14:05 -0700
                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-01 14:07 -0700
              Re: Run this under Windows and Linux Michael S <already5chosen@yahoo.com> - 2023-11-03 16:04 +0200
                Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 15:24 +0100
                  Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:14 -0700
            Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-01 12:58 -0700
              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-02 07:10 +0100
                Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-02 14:58 +0000
                  Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-02 16:34 +0100
                    Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-02 16:46 +0100
                    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-02 13:12 -0700
                      Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-03 10:13 +0100
                        Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:16 -0700
                        Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-08 20:33 -0800
                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-02 16:44 +0100
                    Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-02 16:02 +0000
                      Re: Run this under Windows and Linux Michael S <already5chosen@yahoo.com> - 2023-11-03 16:10 +0200
                        Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 21:05 -0700
                          Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-05 04:23 +0000
                Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-02 15:37 +0000
                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-02 16:48 +0100
                    Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-02 16:00 +0000
                      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-02 17:26 +0100
                        Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-03 10:15 +0100
                          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 11:55 +0100
                            Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-03 14:41 +0100
                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 15:22 +0100
                                Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-03 16:35 +0100
                                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 16:49 +0100
                                    Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-03 18:02 +0100
                                      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 18:08 +0100
                                        Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-03 17:29 +0000
                                        Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-03 18:52 +0000
                                        Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:21 -0700
                                        Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-04 17:22 +0100
                                          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 17:35 +0100
                                            Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-04 17:56 +0100
                                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 18:18 +0100
                                      Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-03 18:51 +0000
                                      Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:20 -0700
                                    Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-03 17:28 +0000
                                      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 18:30 +0100
                                        Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-03 18:03 +0000
                                          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 19:07 +0100
                                            Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 19:08 +0100
                                              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:26 -0700
                                        Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-03 18:54 +0000
                                          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 20:25 +0100
                                            Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-03 20:56 +0000
                                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:15 +0100
                                                Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-04 16:05 +0000
                                                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 17:35 +0100
                                                Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-04 18:44 +0000
                                    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:19 -0700
                                      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:16 +0100
                                      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:25 +0100
                                        Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 12:42 -0700
                                          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-05 05:33 +0100
                                          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-05 05:35 +0100
                                            Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 12:11 -0800
                                              Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-05 22:54 +0000
                                                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 18:49 -0800
                                                  Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-06 02:58 +0000
                            Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-03 15:32 +0000
                              Re: Run this under Windows and Linux David Brown <david.brown@hesbynett.no> - 2023-11-03 18:05 +0100
                            Re: Run this under Windows and Linux scott@slp53.sl.home (Scott Lurndal) - 2023-11-03 16:53 +0000
                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-03 18:09 +0100
                                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:25 -0700
                                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:17 +0100
                                    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 12:44 -0700
                                      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-05 05:36 +0100
                                        Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-05 17:25 +0000
                                          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-05 18:55 +0100
                                            Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 12:12 -0800
                                              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 12:18 -0800
                                                Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-05 22:55 +0000
                                                  Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 18:53 -0800
                                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 04:44 +0100
                                                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 20:10 -0800
                                                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 05:16 +0100
                                                    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-08 20:44 -0800
                                                Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-06 04:22 +0000
                                                  Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 05:37 +0100
                                                    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 21:01 -0800
                                                  Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 21:00 -0800
                                                    Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 09:36 +0100
                                                      Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-06 12:11 -0800
                                                        Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 23:52 +0100
                                                          Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-07 11:51 -0800
                                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 05:15 +0100
                                                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 21:02 -0800
                                                  Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 21:05 -0800
                                                    Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 09:37 +0100
                                                      Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-06 12:13 -0800
                                                        Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-06 23:53 +0100
                                                          Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-06 23:00 +0000
                                                            Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-07 05:36 +0100
                                                              Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-07 05:29 +0000
                                                                Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-07 09:38 +0100
                                                                  Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-07 11:53 -0800
                                                                    Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-09 05:49 +0100
                                                                      Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-08 20:52 -0800
                                                                        Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-09 05:54 +0100
                                                                          Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-08 20:57 -0800
                                                                  Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-08 20:45 -0800
                                            Re: Run this under Windows and Linux Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-05 20:53 +0000
                                              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-06 12:13 -0800
                              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:24 -0700
                            Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-03 15:18 -0700
                              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:18 +0100
                                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 12:45 -0700
                      Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-02 13:18 -0700
          Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-01 13:21 +0100
            Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-01 12:59 -0700
              Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 00:01 -0700
              Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:19 +0100
                Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:53 +0100
                Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 12:51 -0700
                  Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 12:53 -0700
                    Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-04 12:54 -0700
                      Re: Run this under Windows and Linux "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-11-05 12:15 -0800
    Re: Run this under Windows and Linux Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2023-11-03 21:18 +0000
      Re: Run this under Windows and Linux Bonita Montero <Bonita.Montero@gmail.com> - 2023-11-04 10:29 +0100
        Re: Run this under Windows and Linux Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2023-11-05 15:30 +0000

Page 7 of 8 — ← Prev page 1 2 3 4 5 6 [7] 8  Next page →


#117632

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-06 12:13 -0800
Message-ID<uibhcv$jujq$2@dont-email.me>
In reply to#117625
On 11/6/2023 12:37 AM, Bonita Montero wrote:
> Am 06.11.2023 um 06:05 schrieb Chris M. Thomasson:
> 
>> A mutex is not a semaphore. A semaphore is not a mutex.
> 
> A mutex which doesn't maintain the identity of the locking
> thread also can be used as a semaphore.
> 
> 

Barf! A mutex is not a semaphore. However, you can implement a semaphore 
using a mutex and condition variables.

[toc] | [prev] | [next] | [standalone]


#117636

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-11-06 23:53 +0100
Message-ID<uibqor$lkgq$2@raubtier-asyl.eternal-september.org>
In reply to#117632
Am 06.11.2023 um 21:13 schrieb Chris M. Thomasson:

> Barf! A mutex is not a semaphore. ...

A mutex which doesn't maintain the caller's identity is a semaphore.

[toc] | [prev] | [next] | [standalone]


#117637

FromKaz Kylheku <864-117-4973@kylheku.com>
Date2023-11-06 23:00 +0000
Message-ID<20231106145534.670@kylheku.com>
In reply to#117636
On 2023-11-06, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 06.11.2023 um 21:13 schrieb Chris M. Thomasson:
>
>> Barf! A mutex is not a semaphore. ...
>
> A mutex which doesn't maintain the caller's identity is a semaphore.

We cannot jump to that conclusion.

To use a mutex a a semaphore, we map the unlock operation to signal
and lock to wait.

It must be possible to signal multiple times.

If the mutex object rejects the unlock operation if it is already
in an unlocked state (for instance, by terminating the process with an
assertion) then it cannot function as a semaphore.

I suggest you abandon this fruitless exercise and let semaphores
be semaphores and mutexes be mutexes.

They are different things and we have different words for them,
which is useful; don't try to wreck it.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

[toc] | [prev] | [next] | [standalone]


#117638

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-11-07 05:36 +0100
Message-ID<uicers$s4b4$1@raubtier-asyl.eternal-september.org>
In reply to#117637
Am 07.11.2023 um 00:00 schrieb Kaz Kylheku:

> To use a mutex a a semaphore, we map the unlock operation to signal
> and lock to wait.

If you have a mutex that doesn't memorize who's the locking thread
a lock() is an acquire() and an unlock() is a release().

[toc] | [prev] | [next] | [standalone]


#117639

FromKaz Kylheku <864-117-4973@kylheku.com>
Date2023-11-07 05:29 +0000
Message-ID<20231106212621.923@kylheku.com>
In reply to#117638
On 2023-11-07, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 07.11.2023 um 00:00 schrieb Kaz Kylheku:
>
>> To use a mutex a a semaphore, we map the unlock operation to signal
>> and lock to wait.
>
> If you have a mutex that doesn't memorize who's the locking thread
> a lock() is an acquire() and an unlock() is a release().

That does not follow. Sure; not memorizing the locking thread
does remove one roadblock.

Not having an owner appears to be is a necessary condition.

You're not distinguishing between necessary and sufficient conditions.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

[toc] | [prev] | [next] | [standalone]


#117641

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-11-07 09:38 +0100
Message-ID<uict2p$u572$1@raubtier-asyl.eternal-september.org>
In reply to#117639
Am 07.11.2023 um 06:29 schrieb Kaz Kylheku:

> That does not follow. Sure; not memorizing the locking thread
> does remove one roadblock.
> Not having an owner appears to be is a necessary condition.
> You're not distinguishing between necessary and sufficient conditions.

It the mutex doesn't track the owner, specified or not,
it's a binary semaphore.

[toc] | [prev] | [next] | [standalone]


#117654

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-07 11:53 -0800
Message-ID<uie4j9$15j47$2@dont-email.me>
In reply to#117641
On 11/7/2023 12:38 AM, Bonita Montero wrote:
> Am 07.11.2023 um 06:29 schrieb Kaz Kylheku:
> 
>> That does not follow. Sure; not memorizing the locking thread
>> does remove one roadblock.
>> Not having an owner appears to be is a necessary condition.
>> You're not distinguishing between necessary and sufficient conditions.
> 
> It the mutex doesn't track the owner, specified or not,
> it's a binary semaphore.

Still wrong.

[toc] | [prev] | [next] | [standalone]


#117686

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-11-09 05:49 +0100
Message-ID<uihocd$2211r$1@raubtier-asyl.eternal-september.org>
In reply to#117654
Am 07.11.2023 um 20:53 schrieb Chris M. Thomasson:

> On 11/7/2023 12:38 AM, Bonita Montero wrote:

>> It the mutex doesn't track the owner, specified or not,
>> it's a binary semaphore.

> Still wrong.

No, absolutely true. If you have a mutex which doesn't track
the owning thread you're not mandated to release it in the
same thread.

[toc] | [prev] | [next] | [standalone]


#117688

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-08 20:52 -0800
Message-ID<uihoik$21rab$7@dont-email.me>
In reply to#117686
On 11/8/2023 8:49 PM, Bonita Montero wrote:
> Am 07.11.2023 um 20:53 schrieb Chris M. Thomasson:
> 
>> On 11/7/2023 12:38 AM, Bonita Montero wrote:
> 
>>> It the mutex doesn't track the owner, specified or not,
>>> it's a binary semaphore.
> 
>> Still wrong.
> 
> No, absolutely true. If you have a mutex which doesn't track
> the owning thread you're not mandated to release it in the
> same thread.
> 

Mutex != Semaphore

[toc] | [prev] | [next] | [standalone]


#117689

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-11-09 05:54 +0100
Message-ID<uihom0$223j2$1@raubtier-asyl.eternal-september.org>
In reply to#117688
Am 09.11.2023 um 05:52 schrieb Chris M. Thomasson:

> Mutex != Semaphore

A mutex which doesn't track the owning thread is functionally
a semaphore.

[toc] | [prev] | [next] | [standalone]


#117691

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-08 20:57 -0800
Message-ID<uihorh$2231v$1@dont-email.me>
In reply to#117689
On 11/8/2023 8:54 PM, Bonita Montero wrote:
> Am 09.11.2023 um 05:52 schrieb Chris M. Thomasson:
> 
>> Mutex != Semaphore
> 
> A mutex which doesn't track the owning thread is functionally
> a semaphore.

Barf! I almost puked. Thanks, Bonita. ;^o

[toc] | [prev] | [next] | [standalone]


#117685

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-08 20:45 -0800
Message-ID<uiho4q$21rab$6@dont-email.me>
In reply to#117641
On 11/7/2023 12:38 AM, Bonita Montero wrote:
> Am 07.11.2023 um 06:29 schrieb Kaz Kylheku:
> 
>> That does not follow. Sure; not memorizing the locking thread
>> does remove one roadblock.
>> Not having an owner appears to be is a necessary condition.
>> You're not distinguishing between necessary and sufficient conditions.
> 
> It the mutex doesn't track the owner, specified or not,
> it's a binary semaphore.
> 
> 

https://youtu.be/cvg5mbM6FGs?t=161

[toc] | [prev] | [next] | [standalone]


#117605

FromKaz Kylheku <864-117-4973@kylheku.com>
Date2023-11-05 20:53 +0000
Message-ID<20231105120232.214@kylheku.com>
In reply to#117597
On 2023-11-05, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 05.11.2023 um 18:25 schrieb Kaz Kylheku:
>> On 2023-11-05, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> google for ... and you'll see a lot of people telling the same
>>> like me.
>> 
>> Bandwagon Fallacy
>> 
>> https://en.wikipedia.org/wiki/Argumentum_ad_populum
>
> In most cases experts are right if they agree on a certain fact.

Firstly, "I googled this up" to "experts" is a huge leap.

Secondly, when have you ever recognized or acknowledged expertise?

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

[toc] | [prev] | [next] | [standalone]


#117633

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-06 12:13 -0800
Message-ID<uibhe4$jujq$3@dont-email.me>
In reply to#117605
On 11/5/2023 12:53 PM, Kaz Kylheku wrote:
> On 2023-11-05, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 05.11.2023 um 18:25 schrieb Kaz Kylheku:
>>> On 2023-11-05, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>> google for ... and you'll see a lot of people telling the same
>>>> like me.
>>>
>>> Bandwagon Fallacy
>>>
>>> https://en.wikipedia.org/wiki/Argumentum_ad_populum
>>
>> In most cases experts are right if they agree on a certain fact.
> 
> Firstly, "I googled this up" to "experts" is a huge leap.
> 
> Secondly, when have you ever recognized or acknowledged expertise?
> 

Bonita is the expert? Wow... ;^o

[toc] | [prev] | [next] | [standalone]


#117540

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-03 15:24 -0700
Message-ID<ui3ru6$2vc30$9@dont-email.me>
In reply to#117516
On 11/3/2023 9:53 AM, Scott Lurndal wrote:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>> Am 03.11.2023 um 10:15 schrieb David Brown:
>>> On 02/11/2023 17:26, Bonita Montero wrote:
>>>> Am 02.11.2023 um 17:00 schrieb Kaz Kylheku:
>>>>
>>>>> Locked isn't necessarily owned.
>>>>> The semaphore does not record the ID of an owner.
>>>>
>>>> A non-recursive mutes also doesn't do this. The surrounding
>>>> code itself is designed in a way that it behaves like an owner.
>>>
>>> Mutexes - recursive or non-recursive - /do/ record their owner when the
>>> lock is taken. ...
>>
>> Absolutely not. You can take ownership of a mutex in one thread and
>> release it in another thread.
> 
> That has to be the worst idea you've proposed so far.

That should be framed! ;^O

[toc] | [prev] | [next] | [standalone]


#117536

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-03 15:18 -0700
Message-ID<ui3rjd$2vc30$5@dont-email.me>
In reply to#117506
On 11/3/2023 3:55 AM, Bonita Montero wrote:
> Am 03.11.2023 um 10:15 schrieb David Brown:
>> On 02/11/2023 17:26, Bonita Montero wrote:
>>> Am 02.11.2023 um 17:00 schrieb Kaz Kylheku:
>>>
>>>> Locked isn't necessarily owned.
>>>> The semaphore does not record the ID of an owner.
>>>
>>> A non-recursive mutes also doesn't do this. The surrounding
>>> code itself is designed in a way that it behaves like an owner.
>>
>> Mutexes - recursive or non-recursive - /do/ record their owner when 
>> the lock is taken. ...
> 
> Absolutely not. You can take ownership of a mutex in one thread and
> release it in another thread. 

Oh, really!?!?!? Yikes!

> The mentioned benaphore, which is the
> basic skeleton for all mutexes, is a good example for that.

Oh my. A benaphore is basically a userspace semaphore using a kernel 
semaphore for slow paths.

[toc] | [prev] | [next] | [standalone]


#117550

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-11-04 10:18 +0100
Message-ID<ui528p$3a606$5@dont-email.me>
In reply to#117536
Am 03.11.2023 um 23:18 schrieb Chris M. Thomasson:

> Oh my. A benaphore is basically a userspace semaphore using a kernel 
> semaphore for slow paths.

There isn't sth. like a userspace semaphore since with a sempahore
you need support to sleep or to be awakened.

[toc] | [prev] | [next] | [standalone]


#117572

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-04 12:45 -0700
Message-ID<ui670n$3haup$3@dont-email.me>
In reply to#117550
On 11/4/2023 2:18 AM, Bonita Montero wrote:
> Am 03.11.2023 um 23:18 schrieb Chris M. Thomasson:
> 
>> Oh my. A benaphore is basically a userspace semaphore using a kernel 
>> semaphore for slow paths.
> 
> There isn't sth. like a userspace semaphore since with a sempahore
> you need support to sleep or to be awakened.
> 
> 

Huh? The point of the benaphore (a semaphore) is to try to avoid going 
into the kernel to sleep or to be awakened.

God damn it Bonita!

[toc] | [prev] | [next] | [standalone]


#117502

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2023-11-02 13:18 -0700
Message-ID<ui106j$2cj95$1@dont-email.me>
In reply to#117498
On 11/2/2023 9:00 AM, Kaz Kylheku wrote:
> On 2023-11-02, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 02.11.2023 um 16:37 schrieb Kaz Kylheku:
>>
>>> Firstly, it doesn't have to be binary to be used as a mutex.
>>
>> No, but when being used as a mutex its actual maximum value is one.
>>
>>> A semaphore isn't a mutex because it doesn't incorporate the concept
>>> of lock ownership.
>>
>> Thats not dependent on actual implementation but how you consider
>> the value of the binary semaphore. If it is false it is owned.
> 
> If it is false, it can be understood as representing a locked state.
> 
> Locked isn't necessarily owned.
> 
> The semaphore does not record the ID of an owner.
> 
> In a correct program, a binary semaphore can represent a lock, yet there
> can be legitimate situations where a thread which didn't place the lock
> releases it.
> 

True. This makes me think of robust mutexes... ;^)

[toc] | [prev] | [next] | [standalone]


#117459

FromBonita Montero <Bonita.Montero@gmail.com>
Date2023-11-01 13:21 +0100
Message-ID<uhtfrr$1jvsr$1@dont-email.me>
In reply to#117453
Am 31.10.2023 um 21:59 schrieb Chris M. Thomasson:

> Why do you say that?

The article you mentioned is also discussed here:
https://stackoverflow.com/questions/1635416/are-benaphores-worth-implementing-on-modern-oss
The first replier says the same I said: its a normal mutex.

[toc] | [prev] | [next] | [standalone]


Page 7 of 8 — ← Prev page 1 2 3 4 5 6 [7] 8  Next page →

Back to top | Article view | comp.lang.c++


csiph-web