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
2082a97d
Commit
2082a97d
authored
Mar 21, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use a standard async I/O event to signal directory changes.
parent
a133ad56
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
27 deletions
+8
-27
directory.c
dlls/ntdll/directory.c
+1
-3
server_protocol.h
include/wine/server_protocol.h
+1
-2
change.c
server/change.c
+6
-20
protocol.def
server/protocol.def
+0
-1
trace.c
server/trace.c
+0
-1
No files found.
dlls/ntdll/directory.c
View file @
2082a97d
...
...
@@ -2148,7 +2148,6 @@ done:
struct
read_changes_info
{
HANDLE
FileHandle
;
HANDLE
Event
;
PIO_APC_ROUTINE
ApcRoutine
;
PVOID
ApcContext
;
PVOID
Buffer
;
...
...
@@ -2259,7 +2258,6 @@ NtNotifyChangeDirectoryFile( HANDLE FileHandle, HANDLE Event,
return
STATUS_NO_MEMORY
;
info
->
FileHandle
=
FileHandle
;
info
->
Event
=
Event
;
info
->
Buffer
=
Buffer
;
info
->
BufferSize
=
BufferSize
;
info
->
ApcRoutine
=
ApcRoutine
;
...
...
@@ -2268,13 +2266,13 @@ NtNotifyChangeDirectoryFile( HANDLE FileHandle, HANDLE Event,
SERVER_START_REQ
(
read_directory_changes
)
{
req
->
handle
=
FileHandle
;
req
->
event
=
Event
;
req
->
filter
=
CompletionFilter
;
req
->
want_data
=
(
Buffer
!=
NULL
);
req
->
subtree
=
WatchTree
;
req
->
async
.
callback
=
read_changes_apc
;
req
->
async
.
iosb
=
IoStatusBlock
;
req
->
async
.
arg
=
info
;
req
->
async
.
event
=
Event
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
...
...
include/wine/server_protocol.h
View file @
2082a97d
...
...
@@ -1655,7 +1655,6 @@ struct read_directory_changes_request
struct
request_header
__header
;
unsigned
int
filter
;
obj_handle_t
handle
;
obj_handle_t
event
;
int
subtree
;
int
want_data
;
async_data_t
async
;
...
...
@@ -4700,6 +4699,6 @@ union generic_reply
struct
allocate_locally_unique_id_reply
allocate_locally_unique_id_reply
;
};
#define SERVER_PROTOCOL_VERSION 28
4
#define SERVER_PROTOCOL_VERSION 28
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/change.c
View file @
2082a97d
...
...
@@ -282,10 +282,7 @@ void do_change_notify( int unix_fd )
static
void
dir_signal_changed
(
struct
dir
*
dir
)
{
if
(
dir
->
event
)
set_event
(
dir
->
event
);
else
wake_up
(
&
dir
->
obj
,
0
);
if
(
!
dir
->
event
)
wake_up
(
&
dir
->
obj
,
0
);
}
/* SIGIO callback, called synchronously with the poll loop */
...
...
@@ -347,11 +344,7 @@ static void dir_destroy( struct object *obj )
async_terminate_queue
(
&
dir
->
change_q
,
STATUS_CANCELLED
);
while
((
record
=
get_first_change_record
(
dir
)))
free
(
record
);
if
(
dir
->
event
)
{
set_event
(
dir
->
event
);
release_object
(
dir
->
event
);
}
if
(
dir
->
event
)
release_object
(
dir
->
event
);
release_object
(
dir
->
fd
);
if
(
inotify_fd
&&
list_empty
(
&
change_list
))
...
...
@@ -1088,19 +1081,16 @@ DECL_HANDLER(read_directory_changes)
return
;
/* possibly send changes through an event flag */
if
(
req
->
event
)
{
event
=
get_event_obj
(
current
->
process
,
req
->
event
,
EVENT_MODIFY_STATE
);
if
(
!
event
)
goto
end
;
}
if
(
req
->
async
.
event
&&
!
(
event
=
get_event_obj
(
current
->
process
,
req
->
async
.
event
,
EVENT_MODIFY_STATE
)))
goto
end
;
/* discard the current data, and move onto the next event */
if
(
dir
->
event
)
release_object
(
dir
->
event
);
dir
->
event
=
event
;
/* requests don't timeout */
if
(
!
create_async
(
current
,
NULL
,
&
dir
->
change_q
,
&
req
->
async
))
return
;
if
(
!
create_async
(
current
,
NULL
,
&
dir
->
change_q
,
&
req
->
async
))
goto
end
;
/* assign it once */
if
(
!
dir
->
filter
)
...
...
@@ -1116,10 +1106,6 @@ DECL_HANDLER(read_directory_changes)
if
(
dir
->
signaled
>
0
)
dir
->
signaled
--
;
/* clear the event */
if
(
event
)
reset_event
(
event
);
/* if there's already a change in the queue, send it */
if
(
!
list_empty
(
&
dir
->
change_q
)
&&
!
list_empty
(
&
dir
->
change_records
))
...
...
server/protocol.def
View file @
2082a97d
...
...
@@ -1299,7 +1299,6 @@ enum char_info_mode
@REQ(read_directory_changes)
unsigned int filter; /* notification filter */
obj_handle_t handle; /* handle to the directory */
obj_handle_t event; /* handle to the event */
int subtree; /* watch the subtree? */
int want_data; /* flag indicating whether change data should be collected */
async_data_t async; /* async I/O parameters */
...
...
server/trace.c
View file @
2082a97d
...
...
@@ -1655,7 +1655,6 @@ static void dump_read_directory_changes_request( const struct read_directory_cha
{
fprintf
(
stderr
,
" filter=%08x,"
,
req
->
filter
);
fprintf
(
stderr
,
" handle=%p,"
,
req
->
handle
);
fprintf
(
stderr
,
" event=%p,"
,
req
->
event
);
fprintf
(
stderr
,
" subtree=%d,"
,
req
->
subtree
);
fprintf
(
stderr
,
" want_data=%d,"
,
req
->
want_data
);
fprintf
(
stderr
,
" async="
);
...
...
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