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
2633a5c1
Commit
2633a5c1
authored
4 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
server: Avoid using interlocked functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5d5b6a1f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/change.c
+5
-4
5 additions, 4 deletions
server/change.c
with
5 additions
and
4 deletions
server/change.c
+
5
−
4
View file @
2633a5c1
...
...
@@ -88,7 +88,7 @@ struct dir
uid_t
uid
;
/* file stat.st_uid */
struct
list
entry
;
/* entry in global change notifications list */
unsigned
int
filter
;
/* notification filter */
int
notified
;
/* SIGIO counter */
volatile
int
notified
;
/* SIGIO counter */
int
want_data
;
/* return change data */
int
subtree
;
/* do we want to watch subdirectories? */
struct
list
change_records
;
/* data for the change */
...
...
@@ -307,7 +307,7 @@ void do_change_notify( int unix_fd )
LIST_FOR_EACH_ENTRY
(
dir
,
&
change_list
,
struct
dir
,
entry
)
{
if
(
get_unix_fd
(
dir
->
fd
)
!=
unix_fd
)
continue
;
interlocked_xchg_add
(
&
dir
->
notified
,
1
)
;
dir
->
notified
=
1
;
break
;
}
}
...
...
@@ -319,8 +319,9 @@ void sigio_callback(void)
LIST_FOR_EACH_ENTRY
(
dir
,
&
change_list
,
struct
dir
,
entry
)
{
if
(
interlocked_xchg
(
&
dir
->
notified
,
0
))
fd_async_wake_up
(
dir
->
fd
,
ASYNC_TYPE_WAIT
,
STATUS_ALERTED
);
if
(
!
dir
->
notified
)
continue
;
dir
->
notified
=
0
;
fd_async_wake_up
(
dir
->
fd
,
ASYNC_TYPE_WAIT
,
STATUS_ALERTED
);
}
}
...
...
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