FreeBSD Bugzilla – Attachment 127687 Details for
Bug 171550
[ndis] [patch] "no match for InterlockedCompareExchange" and then kernel panic upon kldload ndisgen module for RTL8188/8192CU
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.62 KB, created by
Chris Radek
on 2012-09-11 17:40:07 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Chris Radek
Created:
2012-09-11 17:40:07 UTC
Size:
1.62 KB
patch
obsolete
>diff --recursive -u usrsrc9.orig/sys/compat/ndis/ntoskrnl_var.h usrsrc9/sys/compat/ndis/ntoskrnl_var.h >--- usrsrc9.orig/sys/compat/ndis/ntoskrnl_var.h 2012-09-08 17:30:39.673644663 -0500 >+++ usrsrc9/sys/compat/ndis/ntoskrnl_var.h 2012-09-08 17:31:21.248566542 -0500 >@@ -1460,6 +1460,8 @@ > extern uint8_t KeSynchronizeExecution(kinterrupt *, void *, void *); > extern uintptr_t InterlockedExchange(volatile uint32_t *, > uintptr_t); >+extern uintptr_t InterlockedCompareExchange(volatile uint32_t *, >+ uintptr_t, uintptr_t); > extern void *ExAllocatePoolWithTag(uint32_t, size_t, uint32_t); > extern void ExFreePool(void *); > extern uint32_t IoConnectInterrupt(kinterrupt **, void *, void *, >diff --recursive -u usrsrc9.orig/sys/compat/ndis/subr_ntoskrnl.c usrsrc9/sys/compat/ndis/subr_ntoskrnl.c >--- usrsrc9.orig/sys/compat/ndis/subr_ntoskrnl.c 2012-09-08 17:30:27.011560031 -0500 >+++ usrsrc9/sys/compat/ndis/subr_ntoskrnl.c 2012-09-08 17:31:21.249568664 -0500 >@@ -2361,6 +2361,22 @@ > return (r); > } > >+uintptr_t >+InterlockedCompareExchange(dst, exc, com) >+ volatile uint32_t *dst; >+ uintptr_t exc; >+ uintptr_t com; >+{ >+ uintptr_t r; >+ >+ mtx_lock_spin(&ntoskrnl_interlock); >+ r = *dst; >+ if(*dst == com) *dst = exc; >+ mtx_unlock_spin(&ntoskrnl_interlock); >+ >+ return (r); >+} >+ > static uint32_t > InterlockedIncrement(addend) > volatile uint32_t *addend; >@@ -4381,6 +4397,7 @@ > IMPORT_FFUNC(InterlockedIncrement, 1), > IMPORT_FFUNC(InterlockedDecrement, 1), > IMPORT_FFUNC(InterlockedExchange, 2), >+ IMPORT_FFUNC(InterlockedCompareExchange, 3), > IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), > IMPORT_SFUNC(IoAllocateMdl, 5), > IMPORT_SFUNC(IoFreeMdl, 1),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 171550
: 127687