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
146c2631
Commit
146c2631
authored
Apr 05, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 17, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Return STATUS_NO_YIELD_PERFORMED from NtYieldExecution() on Linux if no yield was performed.
parent
b2564ffc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
sync.c
dlls/ntdll/unix/sync.c
+13
-0
No files found.
dlls/ntdll/unix/sync.c
View file @
146c2631
...
...
@@ -43,6 +43,9 @@
#ifdef HAVE_SCHED_H
# include <sched.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -1514,7 +1517,17 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait,
NTSTATUS
WINAPI
NtYieldExecution
(
void
)
{
#ifdef HAVE_SCHED_YIELD
#ifdef RUSAGE_THREAD
struct
rusage
u1
,
u2
;
int
ret
;
ret
=
getrusage
(
RUSAGE_THREAD
,
&
u1
);
#endif
sched_yield
();
#ifdef RUSAGE_THREAD
if
(
!
ret
)
ret
=
getrusage
(
RUSAGE_THREAD
,
&
u2
);
if
(
!
ret
&&
u1
.
ru_nvcsw
==
u2
.
ru_nvcsw
&&
u1
.
ru_nivcsw
==
u2
.
ru_nivcsw
)
return
STATUS_NO_YIELD_PERFORMED
;
#endif
return
STATUS_SUCCESS
;
#else
return
STATUS_NO_YIELD_PERFORMED
;
...
...
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