diff options
author | jkim <jkim@FreeBSD.org> | 2007-03-30 01:07:28 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2007-03-30 01:07:28 +0000 |
commit | 19e6b257f6e173b3f4855a6429b1e358f944fa5d (patch) | |
tree | 579ab57a769654d07e88b723165821e8151b93a1 /sys/i386 | |
parent | cfcc6fe5fa25fc150f0c4c2c3277813a2a77dffd (diff) | |
download | FreeBSD-src-19e6b257f6e173b3f4855a6429b1e358f944fa5d.zip FreeBSD-src-19e6b257f6e173b3f4855a6429b1e358f944fa5d.tar.gz |
MFP4: Linux futex support for amd64.
Initial patch was submitted by kib and additional work was done
by Divacky Roman.
Tested by: emulation
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/support.s | 63 |
1 files changed, 2 insertions, 61 deletions
diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index bacf506..4083c03 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -1549,8 +1549,7 @@ futex_fault: ret /* int futex_xchgl(int oparg, caddr_t uaddr, int *oldval); */ - .globl futex_xchgl -futex_xchgl: +ENTRY(futex_xchgl) movl PCPU(CURPCB), %eax movl $futex_fault, PCB_ONFAULT(%eax) movl 4(%esp), %eax @@ -1568,8 +1567,7 @@ futex_xchgl: ret /* int futex_addl(int oparg, caddr_t uaddr, int *oldval); */ - .globl futex_addl -futex_addl: +ENTRY(futex_addl) movl PCPU(CURPCB), %eax movl $futex_fault, PCB_ONFAULT(%eax) movl 4(%esp), %eax @@ -1586,60 +1584,3 @@ futex_addl: movl $0, PCB_ONFAULT(%edx) ret -/* int futex_orl(int oparg, caddr_t uaddr, int *oldval); */ - .globl futex_orl -futex_orl: - movl PCPU(CURPCB), %eax - movl $futex_fault, PCB_ONFAULT(%eax) - movl 4(%esp), %eax - movl 8(%esp), %edx - cmpl $VM_MAXUSER_ADDRESS,%edx - ja futex_fault - - MPLOCKED orl %eax, (%edx) - movl 0xc(%esp), %edx - movl %eax, (%edx) - xorl %eax, %eax - - movl PCPU(CURPCB), %edx - movl $0, PCB_ONFAULT(%edx) - ret - -/* int futex_andnl(int oparg, caddr_t uaddr, int *oldval); */ - .globl futex_andnl -futex_andnl: - movl PCPU(CURPCB), %eax - movl $futex_fault, PCB_ONFAULT(%eax) - movl 4(%esp), %eax - movl 8(%esp), %edx - cmpl $VM_MAXUSER_ADDRESS,%edx - ja futex_fault - - notl (%edx) - MPLOCKED andl %eax, (%edx) - movl 0xc(%esp), %edx - movl %eax, (%edx) - xorl %eax, %eax - - movl PCPU(CURPCB), %edx - movl $0, PCB_ONFAULT(%edx) - ret - -/* int futex_xorl(int oparg, caddr_t uaddr, int *oldval); */ - .globl futex_xorl -futex_xorl: - movl PCPU(CURPCB), %eax - movl $futex_fault, PCB_ONFAULT(%eax) - movl 4(%esp), %eax - movl 8(%esp), %edx - cmpl $VM_MAXUSER_ADDRESS,%edx - ja futex_fault - - MPLOCKED xorl %eax, (%edx) - movl 0xc(%esp), %edx - movl %eax, (%edx) - xorl %eax, %eax - - movl PCPU(CURPCB), %edx - movl $0, PCB_ONFAULT(%edx) - ret |