[pypy-dev] Easy way to get access to cmpxchg?

Ryan Gonzalez rymg19 at gmail.com
Sat Feb 22 02:41:19 CET 2014


Well, I know that Python uses references, so that wouldn't be possible in
normal Python code without using stack inspection.

In RPython, which restricts all of that, it'd have to be another translator
feature that uses magic to get things done.


On Fri, Feb 21, 2014 at 6:39 PM, Timothy Baldridge <tbaldridge at gmail.com>wrote:

> It'd be nice to be able to do something like this in rpython:
>
> compare_and_swap(foo.bar, oldval, newval)
>
> Or basically the cmpxchg. How hard would it be to get this in?
>
> Timothy
>
> --
> "One of the main causes of the fall of the Roman Empire was that-lacking
> zero-they had no way to indicate successful termination of their C
> programs."
> (Robert Firth)
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>
>


-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20140221/65d34a25/attachment.html>


More information about the pypy-dev mailing list