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
de91a8dd
Commit
de91a8dd
authored
Oct 11, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented NtYieldExecution.
parent
5f21fd47
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
15 deletions
+29
-15
kernel_main.c
dlls/kernel/kernel_main.c
+0
-11
sync.c
dlls/kernel/sync.c
+9
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
sync.c
dlls/ntdll/sync.c
+18
-3
winternl.h
include/winternl.h
+1
-0
No files found.
dlls/kernel/kernel_main.c
View file @
de91a8dd
...
...
@@ -242,17 +242,6 @@ LONG WINAPI KERNEL_nop(void)
}
/***********************************************************************
* SwitchToThread (KERNEL32.@)
*/
BOOL
WINAPI
SwitchToThread
(
void
)
{
Sleep
(
0
);
return
1
;
}
/***********************************************************************
* MulDiv (KERNEL32.@)
* RETURNS
* Result of multiplication and division
...
...
dlls/kernel/sync.c
View file @
de91a8dd
...
...
@@ -92,6 +92,15 @@ DWORD WINAPI SleepEx( DWORD timeout, BOOL alertable )
/***********************************************************************
* SwitchToThread (KERNEL32.@)
*/
BOOL
WINAPI
SwitchToThread
(
void
)
{
return
(
NtYieldExecution
()
!=
STATUS_NO_YIELD_PERFORMED
);
}
/***********************************************************************
* WaitForSingleObject (KERNEL32.@)
*/
DWORD
WINAPI
WaitForSingleObject
(
HANDLE
handle
,
DWORD
timeout
)
...
...
dlls/ntdll/ntdll.spec
View file @
de91a8dd
...
...
@@ -270,6 +270,7 @@
@ stdcall NtWriteFile(long long ptr ptr ptr ptr long ptr ptr)
@ stub NtWriteRequestData
@ stdcall NtWriteVirtualMemory(long ptr ptr long ptr)
@ stdcall NtYieldExecution()
@ stub PfxFindPrefix
@ stub PfxInitialize
@ stub PfxInsertPrefix
...
...
@@ -1079,7 +1080,6 @@
@ stub NtReadFileScatter
@ stub NtSignalAndWaitForSingleObject
@ stub NtWriteFileGather
@ stub NtYieldExecution
@ stub RtlAddAtomToAtomTable
@ stub RtlAllocateHandle
@ stub RtlCreateAtomTable
...
...
dlls/ntdll/sync.c
View file @
de91a8dd
...
...
@@ -619,6 +619,20 @@ NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LA
/******************************************************************
* NtYieldExecution (NTDLL.@)
*/
NTSTATUS
WINAPI
NtYieldExecution
(
void
)
{
#ifdef HAVE_SCHED_YIELD
sched_yield
();
return
STATUS_SUCCESS
;
#else
return
STATUS_NO_YIELD_PERFORMED
;
#endif
}
/******************************************************************
* NtDelayExecution (NTDLL.@)
*/
NTSTATUS
WINAPI
NtDelayExecution
(
BOOLEAN
alertable
,
const
LARGE_INTEGER
*
timeout
)
...
...
@@ -635,9 +649,10 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
{
for
(;;)
select
(
0
,
NULL
,
NULL
,
NULL
,
NULL
);
}
#ifdef HAVE_SCHED_YIELD
else
if
(
!
timeout
->
QuadPart
)
sched_yield
();
#endif
else
if
(
!
timeout
->
QuadPart
)
{
NtYieldExecution
();
}
else
{
abs_time_t
when
;
...
...
include/winternl.h
View file @
de91a8dd
...
...
@@ -1371,6 +1371,7 @@ NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
NTSTATUS
WINAPI
NtWaitForMultipleObjects
(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
NTSTATUS
WINAPI
NtWriteFile
(
HANDLE
,
HANDLE
,
PIO_APC_ROUTINE
,
PVOID
,
PIO_STATUS_BLOCK
,
const
void
*
,
ULONG
,
PLARGE_INTEGER
,
PULONG
);
NTSTATUS
WINAPI
NtWriteVirtualMemory
(
HANDLE
,
void
*
,
const
void
*
,
SIZE_T
,
SIZE_T
*
);
NTSTATUS
WINAPI
NtYieldExecution
(
void
);
void
WINAPI
RtlAcquirePebLock
(
void
);
BYTE
WINAPI
RtlAcquireResourceExclusive
(
LPRTL_RWLOCK
,
BYTE
);
...
...
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