Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
c19fef41
Commit
c19fef41
authored
22 years ago
by
Marcus Meissner
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed strict aliasing issue in __pthread_once and SetWaitableTimer.
parent
a9fecb90
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scheduler/pthread.c
+2
-1
2 additions, 1 deletion
scheduler/pthread.c
scheduler/timer.c
+5
-1
5 additions, 1 deletion
scheduler/timer.c
with
7 additions
and
2 deletions
scheduler/pthread.c
+
2
−
1
View file @
c19fef41
...
...
@@ -198,8 +198,9 @@ int pthread_attr_setschedparam(pthread_attr_t *attr,
int
__pthread_once
(
pthread_once_t
*
once_control
,
void
(
*
init_routine
)(
void
))
{
static
pthread_once_t
the_once
=
PTHREAD_ONCE_INIT
;
LONG
once_now
=
*
(
LONG
*
)
&
the_once
;
LONG
once_now
;
memcpy
(
&
once_now
,
&
the_once
,
sizeof
(
once_now
));
if
(
InterlockedCompareExchange
((
LONG
*
)
once_control
,
once_now
+
1
,
once_now
)
==
once_now
)
(
*
init_routine
)();
return
0
;
...
...
This diff is collapsed.
Click to expand it.
scheduler/timer.c
+
5
−
1
View file @
c19fef41
...
...
@@ -147,7 +147,11 @@ BOOL WINAPI SetWaitableTimer( HANDLE handle, const LARGE_INTEGER *when, LONG per
else
{
DWORD
remainder
;
req
->
sec
=
DOSFS_FileTimeToUnixTime
(
(
FILETIME
*
)
&
exp
,
&
remainder
);
FILETIME
ft
;
ft
.
dwLowDateTime
=
exp
.
s
.
LowPart
;
ft
.
dwHighDateTime
=
exp
.
s
.
HighPart
;
req
->
sec
=
DOSFS_FileTimeToUnixTime
(
&
ft
,
&
remainder
);
req
->
usec
=
remainder
/
10
;
/* convert from 100-ns to us units */
}
req
->
handle
=
handle
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment