The syntax is specific to GCC. "=g"(x) tells it that x is written by the assembly, so the compiler can't propagate an earlier value through the asm. The "g" means that the compiler can store x in a register, or in memory, etc. "%0" is replaced with "x" in the assembly.
For details on the syntax: http://wiki.osdev.org/Inline_Assembly#Clobbered_Registers_Li...