GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-149965: rename `ptr_wise_atomic_memmove` to `_PyObject_ptr_wise_atomic_memmove` by clin1234 · Pull Request #151271 · python/cpython Conversation
|
|
@ZeroIntensity, I've reverted the header change and unit test additions, so my current PR is focused on only one file. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think you misunderstood what I meant. You can move the function to a header (and in fact, you should, because otherwise we're duplicating code), but it was weird to do it in its own PR. Just combine this PR with #151255 and it'll be fine. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ZeroIntensity, mind taking a look again? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you add a multithreaded test stressing this path?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Pointer-by-pointer memmove for PyObject** arrays that is safe for shared | ||
| // objects in Py_GIL_DISABLED builds. Locking is the caller's responsibility. | ||
| static inline void | ||
| _Py_ptr_wise_atomic_memmove(PyObject *a, PyObject **dest, PyObject **src, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We should probably prefix this with _PyObject instead of plain _Py.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| _Py_ptr_wise_atomic_memmove( | ||
| (PyObject *)self, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
To avoid needing to cast on every use, we can turn this into a macro that uses _PyObject_CAST. Here's an outline:
#define _Py_ptr_wise_atomic_memmove(a, dest, src, n) _Py_ptr_wise_atomic_memmove(_PyObject_CAST(a), dest, src, n)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Where would the multithreaded test lie within the source tree, considering that it's an internal function not exported to the public headers? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ptr_wise_atomic_memmove within element_ass_subscrptr_wise_atomic_memmove to _PyObject_ptr_wise_atomic_memmove
|
Do you think a News fragment is needed here? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I meant for the
Yes; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Any pointers on creating such a multi-threaded test in the native |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Add something to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 90 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
a3a98b2 to
6c15025
Compare
…e-149965.edk2ut.rst
|
Ping @ZeroIntensity @erlend-aasland @AA-Turner @emmatyping @itamaro |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Per my previous comments, please add tests.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Removed assertions for object lock in list operations.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.