Heres the Function that throws the errors:
Code: Select all
void mutex_SetSpinLock(spinlock *lock) {
__asm__ __volatile__ ( "pushal\n"
"_repeat:\n"
"movl $0, %%eax\n"
"movl %0, %%ebx\n"
"cmpl (%%ebx), %%eax\n"
"jne _repeat\n"
"pushfl\n"
"cli\n"
"movl $0, %%eax\n"
"movl %0, %%ebx\n"
"cmpl (%%ebx), %%eax\n"
"je _finish\n"
"popfl\n"
"jmp _repeat\n"
"_finish:\n"
"incl (%%ebx)\n"
"popfl\n"
"popal\n" :: "g" (lock) );
}
Probably an obvious error, but I'm afraid that i will mess it up.c:/shared/gcc/tmp/cci2Hf8i.s: Assembler messages:
c:/shared/gcc/tmp/cci2Hf8i.s:63: Error: symbol `_repeat' is already defined
c:/shared/gcc/tmp/cci2Hf8i.s:76: Error: symbol `_finish' is already defined
c:/shared/gcc/tmp/cci2Hf8i.s:94: Error: symbol `_repeat' is already defined
c:/shared/gcc/tmp/cci2Hf8i.s:107: Error: symbol `_finish' is already defined
Thanks in advance,
-Steven