Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Oct 7, 2023
1 parent 4a8c0b3 commit 3696f01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Include/internal/pycore_signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ PyAPI_FUNC(void) _Py_RestoreSignals(void);

struct _signals_runtime_state {
struct {
/* To access tripped / func with "relaxed" memory order
* _signals_runtime_state.is_tripped should be accessed by
* "sequentially consistent" order as the memory barrier.
*/
int tripped;
/* func is atomic to ensure that PyErr_SetInterrupt is async-signal-safe
* (even though it would probably be otherwise, anyway).
Expand All @@ -62,7 +66,9 @@ struct _signals_runtime_state {
#endif
} wakeup;

/* Speed up sigcheck() when none tripped */
/* Speed up sigcheck() when none tripped and
* act as a memory barrier("sequentially consistent" order)
*/
int is_tripped;

/* These objects necessarily belong to the main interpreter. */
Expand Down

0 comments on commit 3696f01

Please sign in to comment.