Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1e54c1f0
Commit
1e54c1f0
authored
Jul 16, 2002
by
Marcus Meissner
Committed by
Alexandre Julliard
Jul 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented FlushFileBuffers for serial devices.
parent
a7b2bf48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
serial.c
server/serial.c
+17
-2
No files found.
server/serial.c
View file @
1e54c1f0
...
...
@@ -55,6 +55,7 @@ static int serial_get_poll_events( struct object *obj );
static
void
serial_queue_async
(
struct
object
*
obj
,
void
*
ptr
,
unsigned
int
status
,
int
type
,
int
count
);
static
void
destroy_serial
(
struct
object
*
obj
);
static
void
serial_poll_event
(
struct
object
*
obj
,
int
event
);
static
int
serial_flush
(
struct
object
*
obj
);
struct
serial
{
...
...
@@ -92,7 +93,7 @@ static const struct object_ops serial_ops =
serial_get_poll_events
,
/* get_poll_events */
serial_poll_event
,
/* poll_event */
serial_get_fd
,
/* get_fd */
no_flush
,
/* flush */
serial_flush
,
/* flush */
serial_get_info
,
/* get_file_info */
serial_queue_async
,
/* queue_async */
destroy_serial
/* destroy */
...
...
@@ -316,6 +317,21 @@ static void serial_queue_async(struct object *obj, void *ptr, unsigned int statu
set_select_events
(
obj
,
serial_get_poll_events
(
obj
));
}
static
int
serial_flush
(
struct
object
*
obj
)
{
int
ret
;
struct
serial
*
serial
=
(
struct
serial
*
)
grab_object
(
obj
);
assert
(
obj
->
ops
==
&
serial_ops
);
/* MSDN says: If hFile is a handle to a communications device,
* the function only flushes the transmit buffer.
*/
ret
=
(
tcflush
(
serial
->
obj
.
fd
,
TCOFLUSH
)
!=
-
1
);
if
(
!
ret
)
file_set_error
();
release_object
(
serial
);
return
ret
;
}
/* create a serial */
DECL_HANDLER
(
create_serial
)
{
...
...
@@ -391,4 +407,3 @@ DECL_HANDLER(set_serial_info)
release_object
(
serial
);
}
}
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