Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
286ef484
Commit
286ef484
authored
Jan 27, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hal: Implement plain spinlock functions on top of DPC-level ones.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
05f5cce6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
Makefile.in
dlls/hal/Makefile.in
+1
-0
hal.c
dlls/hal/hal.c
+2
-8
No files found.
dlls/hal/Makefile.in
View file @
286ef484
MODULE
=
hal.dll
MODULE
=
hal.dll
IMPORTLIB
=
hal
IMPORTLIB
=
hal
IMPORTS
=
ntoskrnl
C_SRCS
=
\
C_SRCS
=
\
hal.c
hal.c
...
...
dlls/hal/hal.c
View file @
286ef484
...
@@ -76,16 +76,10 @@ KIRQL WINAPI DECLSPEC_HIDDEN __regs_KfAcquireSpinLock( KSPIN_LOCK *lock )
...
@@ -76,16 +76,10 @@ KIRQL WINAPI DECLSPEC_HIDDEN __regs_KfAcquireSpinLock( KSPIN_LOCK *lock )
return
irql
;
return
irql
;
}
}
static
inline
void
small_pause
(
void
)
{
__asm__
__volatile__
(
"rep;nop"
:
:
:
"memory"
);
}
void
WINAPI
KeAcquireSpinLock
(
KSPIN_LOCK
*
lock
,
KIRQL
*
irql
)
void
WINAPI
KeAcquireSpinLock
(
KSPIN_LOCK
*
lock
,
KIRQL
*
irql
)
{
{
TRACE
(
"lock %p, irql %p.
\n
"
,
lock
,
irql
);
TRACE
(
"lock %p, irql %p.
\n
"
,
lock
,
irql
);
while
(
!
InterlockedCompareExchangePointer
(
(
void
**
)
lock
,
(
void
*
)
1
,
(
void
*
)
0
))
KeAcquireSpinLockAtDpcLevel
(
lock
);
small_pause
();
*
irql
=
0
;
*
irql
=
0
;
}
}
...
@@ -98,7 +92,7 @@ void WINAPI DECLSPEC_HIDDEN __regs_KfReleaseSpinLock( KSPIN_LOCK *lock, KIRQL ir
...
@@ -98,7 +92,7 @@ void WINAPI DECLSPEC_HIDDEN __regs_KfReleaseSpinLock( KSPIN_LOCK *lock, KIRQL ir
void
WINAPI
KeReleaseSpinLock
(
KSPIN_LOCK
*
lock
,
KIRQL
irql
)
void
WINAPI
KeReleaseSpinLock
(
KSPIN_LOCK
*
lock
,
KIRQL
irql
)
{
{
TRACE
(
"lock %p, irql %u.
\n
"
,
lock
,
irql
);
TRACE
(
"lock %p, irql %u.
\n
"
,
lock
,
irql
);
InterlockedExchangePointer
(
(
void
**
)
lock
,
0
);
KeReleaseSpinLockFromDpcLevel
(
lock
);
}
}
#endif
/* __i386__ */
#endif
/* __i386__ */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment