Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
2f97636b
Commit
2f97636b
authored
Jul 07, 2018
by
Zebediah Figura
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Create eventfd descriptors for pseudo-fd objects and use them for named pipes.
parent
26148c41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
fd.c
server/fd.c
+22
-0
file.h
server/file.h
+1
-0
named_pipe.c
server/named_pipe.c
+2
-2
No files found.
server/fd.c
View file @
2f97636b
...
...
@@ -96,6 +96,7 @@
#include "handle.h"
#include "process.h"
#include "request.h"
#include "esync.h"
#include "winternl.h"
#include "winioctl.h"
...
...
@@ -199,6 +200,7 @@ struct fd
struct
completion
*
completion
;
/* completion object attached to this fd */
apc_param_t
comp_key
;
/* completion key to set in completion events */
unsigned
int
comp_flags
;
/* completion flags */
int
esync_fd
;
/* esync file descriptor */
};
static
void
fd_dump
(
struct
object
*
obj
,
int
verbose
);
...
...
@@ -1600,6 +1602,9 @@ static void fd_destroy( struct object *obj )
free
(
fd
->
unlink_name
);
free
(
fd
->
unix_name
);
}
if
(
do_esync
())
close
(
fd
->
esync_fd
);
}
/* check if the desired access is possible without violating */
...
...
@@ -1717,6 +1722,7 @@ static struct fd *alloc_fd_object(void)
fd
->
poll_index
=
-
1
;
fd
->
completion
=
NULL
;
fd
->
comp_flags
=
0
;
fd
->
esync_fd
=
-
1
;
init_async_queue
(
&
fd
->
read_q
);
init_async_queue
(
&
fd
->
write_q
);
init_async_queue
(
&
fd
->
wait_q
);
...
...
@@ -1757,11 +1763,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
fd
->
completion
=
NULL
;
fd
->
comp_flags
=
0
;
fd
->
no_fd_status
=
STATUS_BAD_DEVICE_TYPE
;
fd
->
esync_fd
=
-
1
;
init_async_queue
(
&
fd
->
read_q
);
init_async_queue
(
&
fd
->
write_q
);
init_async_queue
(
&
fd
->
wait_q
);
list_init
(
&
fd
->
inode_entry
);
list_init
(
&
fd
->
locks
);
if
(
do_esync
())
fd
->
esync_fd
=
esync_create_fd
(
0
,
0
);
return
fd
;
}
...
...
@@ -2291,6 +2301,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
if
(
fd
->
comp_flags
&
FILE_SKIP_SET_EVENT_ON_HANDLE
)
return
;
fd
->
signaled
=
signaled
;
if
(
signaled
)
wake_up
(
fd
->
user
,
0
);
if
(
do_esync
()
&&
!
signaled
)
esync_clear
(
fd
->
esync_fd
);
}
/* check if events are pending and if yes return which one(s) */
...
...
@@ -2316,6 +2329,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
return
ret
;
}
int
default_fd_get_esync_fd
(
struct
object
*
obj
,
enum
esync_type
*
type
)
{
struct
fd
*
fd
=
get_obj_fd
(
obj
);
int
ret
=
fd
->
esync_fd
;
*
type
=
ESYNC_MANUAL_SERVER
;
release_object
(
fd
);
return
ret
;
}
int
default_fd_get_poll_events
(
struct
fd
*
fd
)
{
int
events
=
0
;
...
...
server/file.h
View file @
2f97636b
...
...
@@ -106,6 +106,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
extern
void
get_nt_name
(
struct
fd
*
fd
,
struct
unicode_str
*
name
);
extern
int
default_fd_signaled
(
struct
object
*
obj
,
struct
wait_queue_entry
*
entry
);
extern
int
default_fd_get_esync_fd
(
struct
object
*
obj
,
enum
esync_type
*
type
);
extern
int
default_fd_get_poll_events
(
struct
fd
*
fd
);
extern
void
default_poll_event
(
struct
fd
*
fd
,
int
event
);
extern
void
fd_cancel_async
(
struct
fd
*
fd
,
struct
async
*
async
);
...
...
server/named_pipe.c
View file @
2f97636b
...
...
@@ -168,7 +168,7 @@ static const struct object_ops pipe_server_ops =
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
default_fd_signaled
,
/* signaled */
NULL
,
/* get_esync_fd */
default_fd_get_esync_fd
,
/* get_esync_fd */
no_satisfied
,
/* satisfied */
no_signal
,
/* signal */
pipe_end_get_fd
,
/* get_fd */
...
...
@@ -213,7 +213,7 @@ static const struct object_ops pipe_client_ops =
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
default_fd_signaled
,
/* signaled */
NULL
,
/* get_esync_fd */
default_fd_get_esync_fd
,
/* get_esync_fd */
no_satisfied
,
/* satisfied */
no_signal
,
/* signal */
pipe_end_get_fd
,
/* get_fd */
...
...
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