mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 04:03:37 +00:00
Fix SESSION5_INITIALIZATION_ERROR by reverting part of 22219. The code is the same as in pre-22219 era, but separated in different files
Thanks Alex for reporting the faulty revision svn path=/trunk/; revision=22347
This commit is contained in:
parent
30c84451ef
commit
2aa4dc8052
6 changed files with 192 additions and 158 deletions
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* LICENSE: GPL - See COPYING in the top level directory
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
* FILE: lib/intrlck/i386/compareexchange.s
|
* FILE: lib/intrlck/i386/compareexchange.c
|
||||||
* PURPOSE: Inter lock compare exchanges
|
* PURPOSE: Inter lock compare exchanges
|
||||||
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
||||||
* Copyright 1997 Onno Hovers
|
* Copyright 1997 Onno Hovers
|
||||||
|
@ -21,13 +21,17 @@
|
||||||
* LONG NTAPI InterlockedCompareExchange(LPLONG Destination, LONG Exchange, LONG Comperand)
|
* LONG NTAPI InterlockedCompareExchange(LPLONG Destination, LONG Exchange, LONG Comperand)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl _InterlockedCompareExchange@12
|
#include <windows.h>
|
||||||
|
LONG
|
||||||
_InterlockedCompareExchange@12:
|
NTAPI
|
||||||
movl 12(%esp),%eax
|
InterlockedCompareExchange(
|
||||||
movl 8(%esp),%ecx
|
LPLONG Destination,
|
||||||
movl 4(%esp),%edx
|
LONG Exchange,
|
||||||
lock
|
LONG Comperand)
|
||||||
cmpxchgl %ecx,(%edx)
|
{
|
||||||
leave
|
LONG ret;
|
||||||
ret $12
|
__asm__ __volatile__(
|
||||||
|
"lock; cmpxchgl %2,(%1)"
|
||||||
|
: "=a" (ret) : "r" (Destination), "r" (Exchange), "0" (Comperand) : "memory" );
|
||||||
|
return ret;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* LICENSE: GPL - See COPYING in the top level directory
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
* FILE: lib/intrlck/i386/decrement.s
|
* FILE: lib/intrlck/i386/decrement.c
|
||||||
* PURPOSE: Inter lock decrements
|
* PURPOSE: Inter lock decrements
|
||||||
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
||||||
* Copyright 1997 Onno Hovers
|
* Copyright 1997 Onno Hovers
|
||||||
|
@ -19,13 +19,20 @@
|
||||||
* LONG NTAPI InterlockedDecrement(LPLONG lpAddend)
|
* LONG NTAPI InterlockedDecrement(LPLONG lpAddend)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl _InterlockedDecrement@4
|
#include <windows.h>
|
||||||
|
LONG
|
||||||
_InterlockedDecrement@4:
|
NTAPI
|
||||||
movl $-1,%ebx
|
InterlockedDecrement(LPLONG lpAddend)
|
||||||
lock
|
{
|
||||||
xaddl %eax,%ebx
|
LONG ret;
|
||||||
decl %eax
|
__asm__
|
||||||
leave
|
(
|
||||||
ret $4
|
"\tlock\n" /* for SMP systems */
|
||||||
|
"\txaddl %0, (%1)\n"
|
||||||
|
"\tdecl %0\n"
|
||||||
|
:"=r" (ret)
|
||||||
|
:"r" (lpAddend), "0" (-1)
|
||||||
|
: "memory"
|
||||||
|
);
|
||||||
|
return ret;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* LICENSE: GPL - See COPYING in the top level directory
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
* FILE: lib/intrlck/i386/exchange.s
|
* FILE: lib/intrlck/i386/exchange.c
|
||||||
* PURPOSE: Inter lock exchanges
|
* PURPOSE: Inter lock exchanges
|
||||||
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
||||||
* Copyright 1997 Onno Hovers
|
* Copyright 1997 Onno Hovers
|
||||||
|
@ -20,10 +20,15 @@
|
||||||
* LONG NTAPI InterlockedExchange(LPLONG target, LONG value)
|
* LONG NTAPI InterlockedExchange(LPLONG target, LONG value)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl _InterlockedExchange@8
|
#include <windows.h>
|
||||||
|
LONG
|
||||||
_InterlockedExchange@8:
|
NTAPI
|
||||||
lock
|
InterlockedExchange(LPLONG target, LONG value)
|
||||||
xchgl %eax,%ebx
|
{
|
||||||
leave
|
LONG ret;
|
||||||
ret $8
|
__asm__ (
|
||||||
|
/* lock for SMP systems */
|
||||||
|
"lock\n\txchgl %0,(%1)"
|
||||||
|
:"=r" (ret):"r" (target), "0" (value):"memory" );
|
||||||
|
return ret;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* LICENSE: GPL - See COPYING in the top level directory
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
* FILE: lib/intrlck/i386/exchangeadd.s
|
* FILE: lib/intrlck/i386/exchangeadd.c
|
||||||
* PURPOSE: Inter lock exchange adds
|
* PURPOSE: Inter lock exchange adds
|
||||||
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
||||||
* Copyright 1997 Onno Hovers
|
* Copyright 1997 Onno Hovers
|
||||||
|
@ -21,10 +21,20 @@
|
||||||
* LONG NTAPI InterlockedExchangeAdd(PLONG Addend, LONG Increment)
|
* LONG NTAPI InterlockedExchangeAdd(PLONG Addend, LONG Increment)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl _InterlockedExchangeAdd@8
|
#include <windows.h>
|
||||||
|
LONG
|
||||||
_InterlockedExchangeAdd@8:
|
NTAPI
|
||||||
lock
|
InterlockedExchangeAdd(
|
||||||
xaddl %eax,%ebx
|
PLONG Addend,
|
||||||
leave
|
LONG Increment)
|
||||||
ret $4
|
{
|
||||||
|
LONG ret;
|
||||||
|
__asm__ (
|
||||||
|
/* lock for SMP systems */
|
||||||
|
"lock\n\t"
|
||||||
|
"xaddl %0,(%1)"
|
||||||
|
:"=r" (ret)
|
||||||
|
:"r" (Addend), "0" (Increment)
|
||||||
|
:"memory" );
|
||||||
|
return ret;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* LICENSE: GPL - See COPYING in the top level directory
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
* FILE: lib/intrlck/i386/increment.s
|
* FILE: lib/intrlck/i386/increment.c
|
||||||
* PURPOSE: Inter lock increments
|
* PURPOSE: Inter lock increments
|
||||||
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
* PROGRAMMERS: Copyright 1995 Martin von Loewis
|
||||||
* Copyright 1997 Onno Hovers
|
* Copyright 1997 Onno Hovers
|
||||||
|
@ -19,12 +19,20 @@
|
||||||
* LONG NTAPI InterlockedIncrement(PLONG Addend)
|
* LONG NTAPI InterlockedIncrement(PLONG Addend)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl _InterlockedIncrement@4
|
#include <windows.h>
|
||||||
|
LONG
|
||||||
_InterlockedIncrement@4:
|
NTAPI
|
||||||
movl $1,%ebx
|
InterlockedIncrement(PLONG lpAddend)
|
||||||
lock
|
{
|
||||||
xaddl %eax,%ebx
|
LONG ret;
|
||||||
incl %eax
|
__asm__
|
||||||
leave
|
(
|
||||||
ret $4
|
"\tlock\n" /* for SMP systems */
|
||||||
|
"\txaddl %0, (%1)\n"
|
||||||
|
"\tincl %0\n"
|
||||||
|
:"=r" (ret)
|
||||||
|
:"r" (lpAddend), "0" (1)
|
||||||
|
: "memory"
|
||||||
|
);
|
||||||
|
return ret;
|
||||||
|
}
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
<if property="ARCH" value="i386">
|
<if property="ARCH" value="i386">
|
||||||
<directory name="i386">
|
<directory name="i386">
|
||||||
<file>compareexchange.s</file>
|
<file>compareexchange.c</file>
|
||||||
<file>decrement.s</file>
|
<file>decrement.c</file>
|
||||||
<file>exchange.s</file>
|
<file>exchange.c</file>
|
||||||
<file>exchangeadd.s</file>
|
<file>exchangeadd.c</file>
|
||||||
<file>increment.s</file>
|
<file>increment.c</file>
|
||||||
</directory>
|
</directory>
|
||||||
</if>
|
</if>
|
||||||
<if property="ARCH" value="ppc">
|
<if property="ARCH" value="ppc">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue