Re: [RFC] Thread safety in some low-level functions

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

 



On Wed, Jun 24, 2020 at 7:29 PM Matheus Tavares Bernardino
<matheus.bernardino@xxxxxx> wrote:
>
> - Regarding, oid_to_hex(), a patch from 2010 [1] proposed a solution
> using thread-local storage and pthread_once(). But as Hannes pointed
> out in this other thread [2] , implementing a Windows equivalence for
> pthread_once() could be tricky and voluminous. Since this thread dates
> from 7 years ago, I was wondering if we would be able to implement it
> nowadays with InitOnceExecuteOnce() [3].

I forgot to link it before, but here is a commit in libav.git which
emulates pthread_once():
https://git.libav.org/?p=libav.git;a=commitdiff;h=b22693b06d1e5d73454a65c203b4d31c1ca5b69a

The patch is not so big, and if we consider only Vista+, it seems very
straightforward. I'm not very familiar with Windows, though, and I'm
not sure if this solution would work for us.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux