[openssl-dev] [openssl-team] Discussion: design issue: async and -lpthread

Nico Williams nico at cryptonector.com
Tue Dec 15 16:41:45 UTC 2015


On Tue, Dec 15, 2015 at 01:24:12PM +0100, Florian Weimer wrote:
> * Nico Williams:
> 
> > On Tue, Dec 08, 2015 at 11:19:32AM +0100, Florian Weimer wrote:
> >> > Maybe http://trac.mpich.org/projects/openpa/ would fit the bill?
> >> 
> >> It seems to have trouble to keep up with new architectures.
> >
> > New architectures are not really a problem because between a) decent
> > compilers with C11 and/or non-C11 atomic intrinsics,
> 
> Not on Windows.

Windows has a family of functions for atomic addition, compare-and-swap,
etcetera:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms686360%28v=vs.85%29.aspx#interlocked_functions

Solaris/Illumos has its own as well.

Linux has several atomics libraries.

And there are several open-source portable atomics libraries as well.

I.e., between compiler non-C11 atomic intrinsics, C11 intrinsics, OS
atomic function libraries, and portable open-source atomics libraries,
we can cover almost all the bases.

> > What's the alternative anyways?
> 
> Using C++11.

Sure, but only for a C atomics library for the rest of OpenSSL.

So that makes five alternatives, plus the two stub implementations (one
with global locks, one with no locking/atomics).  Any platform not
covered will get one of the stub implementations and its users will have
to contribute a better implementation.

We have a surfeit of options, not a dearth of them.  I don't think lack
of atomics primitives is remotely a concern.  We should use atomic
primitives in OpenSSL.

Nico
-- 


More information about the openssl-dev mailing list