diff --git a/rtl/linux/i386/syscall.inc b/rtl/linux/i386/syscall.inc index c9d96af26d..0a27486c75 100644 --- a/rtl/linux/i386/syscall.inc +++ b/rtl/linux/i386/syscall.inc @@ -35,19 +35,22 @@ asm .LSyscOK: {$ifdef VER1_0} movl %edx,Errno + movl %ecx,%eax {$else} movl FPC_THREADVAR_RELOCATE,%eax testl %eax,%eax jne .LThread movl %edx,Errno+4 + movl %ecx,%eax jmp .LNoThread .LThread: + pushl %ecx pushl Errno call *%eax movl %edx,(%eax) + popl %eax .LNoThread: {$endif} - movl %ecx,%eax end; function FpSysCall(sysnr,param1 : TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL1']; @@ -67,19 +70,22 @@ asm .LSyscOK: {$ifdef VER1_0} movl %edx,Errno + movl %ecx,%eax {$else} movl FPC_THREADVAR_RELOCATE,%eax testl %eax,%eax jne .LThread movl %edx,Errno+4 + movl %ecx,%eax jmp .LNoThread .LThread: + pushl %ecx pushl Errno call *%eax movl %edx,(%eax) + popl %eax .LNoThread: {$endif} - movl %ecx,%eax end; function FpSysCall(sysnr,param1,param2 : TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL2']; @@ -100,19 +106,22 @@ asm .LSyscOK: {$ifdef VER1_0} movl %edx,Errno + movl %ecx,%eax {$else} movl FPC_THREADVAR_RELOCATE,%eax testl %eax,%eax jne .LThread movl %edx,Errno+4 + movl %ecx,%eax jmp .LNoThread .LThread: + pushl %ecx pushl Errno call *%eax movl %edx,(%eax) + popl %eax .LNoThread: {$endif} - movl %ecx,%eax end; function FpSysCall(sysnr,param1,param2,param3:TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL3']; @@ -134,19 +143,22 @@ asm .LSyscOK: {$ifdef VER1_0} movl %edx,Errno + movl %ecx,%eax {$else} movl FPC_THREADVAR_RELOCATE,%eax testl %eax,%eax jne .LThread movl %edx,Errno+4 + movl %ecx,%eax jmp .LNoThread .LThread: + pushl %ecx pushl Errno call *%eax movl %edx,(%eax) + popl %eax .LNoThread: {$endif} - movl %ecx,%eax end; function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL4']; @@ -169,19 +181,22 @@ asm .LSyscOK: {$ifdef VER1_0} movl %edx,Errno + movl %ecx,%eax {$else} movl FPC_THREADVAR_RELOCATE,%eax testl %eax,%eax jne .LThread movl %edx,Errno+4 + movl %ecx,%eax jmp .LNoThread .LThread: + pushl %ecx pushl Errno call *%eax movl %edx,(%eax) + popl %eax .LNoThread: {$endif} - movl %ecx,%eax end; function FpSysCall(sysnr,param1,param2,param3,param4,param5 : TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL5']; @@ -205,19 +220,22 @@ asm .LSyscOK: {$ifdef VER1_0} movl %edx,Errno + movl %ecx,%eax {$else} movl FPC_THREADVAR_RELOCATE,%eax testl %eax,%eax jne .LThread movl %edx,Errno+4 + movl %ecx,%eax jmp .LNoThread .LThread: + pushl %ecx pushl Errno call *%eax movl %edx,(%eax) + popl %eax .LNoThread: {$endif} - movl %ecx,%eax end; {$ifdef notsupported} @@ -243,19 +261,22 @@ asm .LSyscOK: {$ifdef VER1_0} movl %edx,Errno + movl %ecx,%eax {$else} movl FPC_THREADVAR_RELOCATE,%eax testl %eax,%eax jne .LThread movl %edx,Errno+4 + movl %ecx,%eax jmp .LNoThread .LThread: + pushl %ecx pushl Errno call *%eax movl %edx,(%eax) + popl %eax .LNoThread: {$endif} - movl %ecx,%eax end; {$endif notsupported} @@ -348,7 +369,10 @@ end; { $Log$ - Revision 1.5 2002-12-23 20:56:32 peter + Revision 1.6 2002-12-23 21:17:53 peter + * MT fix + + Revision 1.5 2002/12/23 20:56:32 peter * Reset Errno to 0 if call is successfull * Fix broken 1.0.x Errno which does not have threadvar