Re: rand() is racy in multi-threaded programs?

2020-12-02 Thread Conrad Meyer
Hi Andriy, On Wed, Dec 2, 2020 at 11:34 PM Andriy Gapon wrote: > > On 03/12/2020 01:20, Conrad Meyer wrote: > > Rand(3) is explicitly unsafe to use from concurrent threads without some > > external serialization, even after initialization. I’d suggest using a > > different > > API. > > thank you

Re: rand() is racy in multi-threaded programs?

2020-12-02 Thread Andriy Gapon
On 03/12/2020 01:20, Conrad Meyer wrote: > Hi Andriy, > > Rand(3) is explicitly unsafe to use from concurrent threads without some > external serialization, even after initialization. I’d suggest using a > different > API. Conrad, thank you! Just want to check, unsafe in terms of bogus results

Re: rand() is racy in multi-threaded programs?

2020-12-02 Thread Conrad Meyer
Hi Andriy, Rand(3) is explicitly unsafe to use from concurrent threads without some external serialization, even after initialization. I’d suggest using a different API. Best, Conrad On Wed, Dec 2, 2020 at 13:53 Andriy Gapon wrote: > > Specifically, concurrent "first" calls to rand(). > There

rand() is racy in multi-threaded programs?

2020-12-02 Thread Andriy Gapon
Specifically, concurrent "first" calls to rand(). There can be a moment when rand3_state is allocated but not completely set up with initstate_r(). Is this a known / documented issue? Should we try to do better? P.S. I am seeing this issue from time to time when running ztest program (from ZFS).

Re: dtrace: give %'d a chance?

2020-12-02 Thread Andriy Gapon
On 02/12/2020 18:52, Mark Johnston wrote: > On Mon, Nov 30, 2020 at 03:50:53PM +0200, Andriy Gapon wrote: >> On 19/11/2020 16:57, Mark Johnston wrote: >>> On Thu, Nov 19, 2020 at 01:28:56PM +0200, Andriy Gapon wrote: what do people think about adding setlocale(LC_NUMERIC, ""); >>

Re: Removing obsolete GDB 6.1.1 for FreeBSD 13

2020-12-02 Thread Ed Maste
On Wed, 2 Dec 2020 at 12:52, Warner Losh wrote: > > even if lldb isn't a complete drop in replacement (I've not used it at all, > so I can't say one way or another). Quick comment on this point - the FreeBSD Foundation has been sponsoring Moritz Systems to improve LLDB on FreeBSD, and they've do

Re: Removing obsolete GDB 6.1.1 for FreeBSD 13

2020-12-02 Thread Warner Losh
On Wed, Dec 2, 2020 at 10:44 AM Ed Maste wrote: > We currently have an obsolete version of GDB 6.1 installed as > /usr/libexec/gdb, kept only for use by crashinfo(8), which extracts > some basic information from a kernel core dump after a crash. If the > gdb port is installed crashinfo will use t

Removing obsolete GDB 6.1.1 for FreeBSD 13

2020-12-02 Thread Ed Maste
We currently have an obsolete version of GDB 6.1 installed as /usr/libexec/gdb, kept only for use by crashinfo(8), which extracts some basic information from a kernel core dump after a crash. If the gdb port is installed crashinfo will use that in preference to /usr/libexec/gdb. If neither exists i

Re: dtrace: give %'d a chance?

2020-12-02 Thread Mark Johnston
On Mon, Nov 30, 2020 at 03:50:53PM +0200, Andriy Gapon wrote: > On 19/11/2020 16:57, Mark Johnston wrote: > > On Thu, Nov 19, 2020 at 01:28:56PM +0200, Andriy Gapon wrote: > >> > >> what do people think about adding > >> setlocale(LC_NUMERIC, ""); > >> to dtrace's main function? > > > > That s

Re: Issues with USB-C external monitors

2020-12-02 Thread Ali Abdallah
On 01.12.2020 17:10, myfreeweb wrote: > devd (really drm in the kernel) provides hotplug events (system DRM, type > HOTPLUG). > libudev-devd translates these to UD_ACTION_HOTPLUG. > This works well with wlroots compositors at least. > How xorg does this I have no idea, as I don't use xorg. > If yo

Re: Issues with USB-C external monitors

2020-12-02 Thread Ali Abdallah
On 01.12.2020 20:33, Poul-Henning Kamp wrote: > > > When I last tried this on my T480/T3-Dock/xorg, the screen comes back, but > xrandr shows it with ever increasing names "DP-3", "DP-4" etc. > > For now I've given up and use the T480's HDMI output instead. I've noticed that as well, th

Re: Issues with USB-C external monitors

2020-12-02 Thread Ali Abdallah
On 01.12.2020 11:08, Scott Long wrote: > I have a work-in-progress to support Thunderbolt, but that’s not always the > same as just DisplayPort-over-USBC. If your connector has the Thunderbolt > logo, then it’s Thunderbolt, if it has the DP logo then it’s not. Even then, > the Thunderbolt comp