C
charles_gero
All:
Quick question regarding reentrancy and C99 signals. If we have a C
statement such as:
variable = 123456;
And the resulting compiled machine code for a particular fake platform
is to load the constant into a register, and then use **TWO** STORE
machine instructions to store the variable back to memory, so that it
looks like:
LOAD 123456, REG
STOR REG_UPPERHALF, ADDR1
STOR REG_LOWERHALF, ADDR2
Is it possible for a signal to be delivered between the STOR's? If so,
what prevents general lvalue modifications from being (for lack of a
better word) non reentrant (ie... the signal handler can modify
REG_LOWERHALF, and when it returns, the lower half of the STOR will be
incorrect)? Are lvalue modifications under C considered atomic?
Please provide a reference into the standard. Thanks so much!
Quick question regarding reentrancy and C99 signals. If we have a C
statement such as:
variable = 123456;
And the resulting compiled machine code for a particular fake platform
is to load the constant into a register, and then use **TWO** STORE
machine instructions to store the variable back to memory, so that it
looks like:
LOAD 123456, REG
STOR REG_UPPERHALF, ADDR1
STOR REG_LOWERHALF, ADDR2
Is it possible for a signal to be delivered between the STOR's? If so,
what prevents general lvalue modifications from being (for lack of a
better word) non reentrant (ie... the signal handler can modify
REG_LOWERHALF, and when it returns, the lower half of the STOR will be
incorrect)? Are lvalue modifications under C considered atomic?
Please provide a reference into the standard. Thanks so much!