??? 01/09/07 18:16 Read: times |
#130521 - Read-Modify-Write Responding to: ???'s previous message |
Jan Waclawek said:
if this is a single-byte variable, this is ignored by compiler... (OK this was simple :-) ) Simple huh? What to do with read-modify-write instructions like ++ ? On variables in data that can be atomic, but not in xdata. Should this become atomic too or not? SDCC cannot declare a variable critical, but only a function, an instruction or a block. int a; int atomic_read_a(void) critical { return a; } critical a++; critical { a++; } |