gccã§atomicã«64bitã®å¤ãä»£å ¥ãããã ä¸å¿ã以ä¸ã®ãããªã³ã¼ãã§å®ç¾ã¯ã§ãããã ãã©ãã #include <stdio.h> #include <stdint.h> #define SEN_SET_64BIT(p,v) \ __asm__ __volatile__ ("1:\n" \ "\tmovl (%0), %%eax\n" \ "\tmovl 4(%0), %%edx\n" \ "\tlock; cmpxchg8b (%0)\n" \ "\tjnz 1b\n" \ : \ : "D"(p), "b"(*(((uint32_t *)&(v))+0)), "c"(*(((uint32_t *)&(v))+1)) \ : "ax", "dx", "memory"); int main (int argc, char *argv[]) { uint64_t a = 0x012
{{#tags}}- {{label}}
{{/tags}}