[New-bugs-announce] [issue26774] Elide Py_atomic fences when WITH_THREAD is disabled?

Larry Hastings report at bugs.python.org
Fri Apr 15 23:29:24 EDT 2016


New submission from Larry Hastings:

Right now the atomic access fence macros in pyatomic.h are unconditional.  This means that they're active even even when you "./configure --without-threads".  If Python thread support is disabled, surely we don't need to ensure atomic access to variables, because there aren't any other threads to compete with.

Shouldn't we add

#ifdef WITH_THREAD
/* current code goes here */
#else
#define _Py_atomic_load_relaxed(x) (x)
/* etc */
#endif

?

----------
messages: 263537
nosy: haypo, jyasskin, larry
priority: low
severity: normal
stage: test needed
status: open
title: Elide Py_atomic fences when WITH_THREAD is disabled?
type: performance
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26774>
_______________________________________


More information about the New-bugs-announce mailing list