From: Elizabeth Figura zfigura@codeweavers.com
--- server/console.c | 67 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 33 deletions(-)
diff --git a/server/console.c b/server/console.c index aa7ec863605..d82e82a254f 100644 --- a/server/console.c +++ b/server/console.c @@ -53,6 +53,7 @@ struct history_line struct console { struct object obj; /* object header */ + struct event_sync *sync; /* sync object for wait/signal */ int signaled; /* is console signaled */ struct thread *renderer; /* console renderer thread */ struct screen_buffer *active; /* active screen buffer */ @@ -68,26 +69,25 @@ struct console
static void console_dump( struct object *obj, int verbose ); static void console_destroy( struct object *obj ); -static int console_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *console_get_fd( struct object *obj ); +static struct object *console_get_sync( struct object *obj ); static struct object *console_lookup_name( struct object *obj, struct unicode_str *name, unsigned int attr, struct object *root ); static struct object *console_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options ); -static int console_add_queue( struct object *obj, struct wait_queue_entry *entry );
static const struct object_ops console_ops = { sizeof(struct console), /* size */ &file_type, /* type */ console_dump, /* dump */ - console_add_queue, /* add_queue */ - remove_queue, /* remove_queue */ - console_signaled, /* signaled */ - no_satisfied, /* satisfied */ + NULL, /* add_queue */ + NULL, /* remove_queue */ + NULL, /* signaled */ + NULL, /* satisfied */ no_signal, /* signal */ console_get_fd, /* get_fd */ - default_get_sync, /* get_sync */ + console_get_sync, /* get_sync */ default_map_access, /* map_access */ default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ @@ -479,10 +479,18 @@ static const struct fd_ops console_connection_fd_ops = static int queue_host_ioctl( struct console_server *server, unsigned int code, unsigned int output, struct async *async, struct async_queue *queue );
-static int console_add_queue( struct object *obj, struct wait_queue_entry *entry ) +static struct fd *console_get_fd( struct object *obj ) { - struct console *console = (struct console*)obj; + struct console *console = (struct console *)obj; assert( obj->ops == &console_ops ); + return (struct fd *)grab_object( console->fd ); +} + +static struct object *console_get_sync( struct object *obj ) +{ + struct console *console = (struct console *)obj; + assert( obj->ops == &console_ops ); + /* before waiting, ensure conhost's input thread has been started */ if (console->server && !console->server->once_input) { @@ -490,20 +498,8 @@ static int console_add_queue( struct object *obj, struct wait_queue_entry *entry if (console->server->term_fd == -1) queue_host_ioctl( console->server, IOCTL_CONDRV_PEEK, 0, NULL, NULL ); } - return add_queue( &console->obj, entry ); -} - -static int console_signaled( struct object *obj, struct wait_queue_entry *entry ) -{ - struct console *console = (struct console*)obj; - return console->signaled; -}
-static struct fd *console_get_fd( struct object *obj ) -{ - struct console *console = (struct console *)obj; - assert( obj->ops == &console_ops ); - return (struct fd *)grab_object( console->fd ); + return grab_object( console->sync ); }
static enum server_fd_type console_get_fd_type( struct fd *fd ) @@ -542,9 +538,8 @@ static struct object *create_console(void) { struct console *console;
- if (!(console = alloc_object( &console_ops ))) - return NULL; - + if (!(console = alloc_object( &console_ops ))) return NULL; + console->sync = NULL; console->renderer = NULL; console->signaled = 0; console->active = NULL; @@ -557,14 +552,14 @@ static struct object *create_console(void) init_async_queue( &console->ioctl_q ); init_async_queue( &console->read_q );
- console->fd = alloc_pseudo_fd( &console_fd_ops, &console->obj, FILE_SYNCHRONOUS_IO_NONALERT ); - if (!console->fd) - { - release_object( console ); - return NULL; - } + if (!(console->sync = create_event_sync( 1, 0 ))) goto error; + if (!(console->fd = alloc_pseudo_fd( &console_fd_ops, &console->obj, FILE_SYNCHRONOUS_IO_NONALERT ))) goto error; allow_fd_caching( console->fd ); return &console->obj; + +error: + release_object( console ); + return NULL; }
static void console_host_ioctl_terminate( struct console_host_ioctl *call, unsigned int status ) @@ -781,6 +776,8 @@ static void console_destroy( struct object *obj ) LIST_FOR_EACH_ENTRY( output, &console->outputs, struct console_output, entry ) output->console = NULL;
+ if (console->sync) release_object( console->sync ); + free_async_queue( &console->ioctl_q ); free_async_queue( &console->read_q ); if (console->fd) @@ -1583,11 +1580,15 @@ DECL_HANDLER(get_next_console_request)
if (!server->console->renderer) server->console->renderer = current;
- if (!req->signal) server->console->signaled = 0; + if (!req->signal) + { + server->console->signaled = 0; + reset_sync( server->console->sync ); + } else if (!server->console->signaled) { server->console->signaled = 1; - wake_up( &server->console->obj, 0 ); + signal_sync( server->console->sync ); LIST_FOR_EACH_ENTRY( screen_buffer, &server->console->screen_buffers, struct screen_buffer, entry ) wake_up( &screen_buffer->obj, 0 ); LIST_FOR_EACH_ENTRY( input, &server->console->inputs, struct console_input, entry )
From: Elizabeth Figura zfigura@codeweavers.com
--- server/console.c | 53 +++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 25 deletions(-)
diff --git a/server/console.c b/server/console.c index d82e82a254f..90da7e8b293 100644 --- a/server/console.c +++ b/server/console.c @@ -135,6 +135,7 @@ struct console_host_ioctl struct console_server { struct object obj; /* object header */ + struct event_sync *sync; /* sync object for wait/signal */ struct fd *fd; /* pseudo-fd for ioctls */ struct console *console; /* attached console */ struct list queue; /* ioctl queue */ @@ -147,8 +148,8 @@ struct console_server
static void console_server_dump( struct object *obj, int verbose ); static void console_server_destroy( struct object *obj ); -static int console_server_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *console_server_get_fd( struct object *obj ); +static struct object *console_server_get_sync( struct object *obj ); static struct object *console_server_lookup_name( struct object *obj, struct unicode_str *name, unsigned int attr, struct object *root ); static struct object *console_server_open_file( struct object *obj, unsigned int access, @@ -159,13 +160,13 @@ static const struct object_ops console_server_ops = sizeof(struct console_server), /* size */ &file_type, /* type */ console_server_dump, /* dump */ - add_queue, /* add_queue */ - remove_queue, /* remove_queue */ - console_server_signaled, /* signaled */ - no_satisfied, /* satisfied */ + NULL, /* add_queue */ + NULL, /* remove_queue */ + NULL, /* signaled */ + NULL, /* satisfied */ no_signal, /* signal */ console_server_get_fd, /* get_fd */ - default_get_sync, /* get_sync */ + console_server_get_sync, /* get_sync */ default_map_access, /* map_access */ default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ @@ -587,7 +588,7 @@ static int queue_host_ioctl( struct console_server *server, unsigned int code, u queue_async( queue, async ); } list_add_tail( &server->queue, &ioctl->entry ); - wake_up( &server->obj, 0 ); + signal_sync( server->sync ); if (async) set_error( STATUS_PENDING ); return 1; } @@ -619,7 +620,7 @@ static void disconnect_console_server( struct console_server *server ) assert( server->console->server == server ); server->console->server = NULL; server->console = NULL; - wake_up( &server->obj, 0 ); + signal_sync( server->sync ); } }
@@ -895,6 +896,7 @@ static void console_server_destroy( struct object *obj ) struct console_server *server = (struct console_server *)obj; assert( obj->ops == &console_server_ops ); disconnect_console_server( server ); + if (server->sync) release_object( server->sync ); if (server->fd) release_object( server->fd ); }
@@ -930,24 +932,25 @@ static struct object *console_server_lookup_name( struct object *obj, struct uni release_object( screen_buffer ); server->console->server = server;
+ if (list_empty( &server->queue )) reset_sync( server->sync ); return &server->console->obj; }
return NULL; }
-static int console_server_signaled( struct object *obj, struct wait_queue_entry *entry ) +static struct fd *console_server_get_fd( struct object* obj ) { struct console_server *server = (struct console_server*)obj; assert( obj->ops == &console_server_ops ); - return !server->console || !list_empty( &server->queue ); + return (struct fd *)grab_object( server->fd ); }
-static struct fd *console_server_get_fd( struct object* obj ) +static struct object *console_server_get_sync( struct object *obj ) { - struct console_server *server = (struct console_server*)obj; + struct console_server *server = (struct console_server *)obj; assert( obj->ops == &console_server_ops ); - return (struct fd *)grab_object( server->fd ); + return grab_object( server->sync ); }
static struct object *console_server_open_file( struct object *obj, unsigned int access, @@ -961,21 +964,23 @@ static struct object *create_console_server( void ) struct console_server *server;
if (!(server = alloc_object( &console_server_ops ))) return NULL; + server->sync = NULL; + server->fd = NULL; server->console = NULL; server->busy = 0; server->once_input = 0; server->term_fd = -1; list_init( &server->queue ); list_init( &server->read_queue ); - server->fd = alloc_pseudo_fd( &console_server_fd_ops, &server->obj, FILE_SYNCHRONOUS_IO_NONALERT ); - if (!server->fd) - { - release_object( server ); - return NULL; - } - allow_fd_caching(server->fd);
+ if (!(server->sync = create_event_sync( 1, 1 ))) goto error; + if (!(server->fd = alloc_pseudo_fd( &console_server_fd_ops, &server->obj, FILE_SYNCHRONOUS_IO_NONALERT ))) goto error; + allow_fd_caching(server->fd); return &server->obj; + +error: + release_object( server ); + return NULL; }
static int is_blocking_read_ioctl( unsigned int code ) @@ -1639,11 +1644,7 @@ DECL_HANDLER(get_next_console_request) free( ioctl ); if (iosb) release_object( iosb );
- if (req->read) - { - release_object( server ); - return; - } + if (req->read) goto done; server->busy = 0; }
@@ -1702,5 +1703,7 @@ DECL_HANDLER(get_next_console_request) set_error( STATUS_PENDING ); }
+done: + if (list_empty( &server->queue )) reset_sync( server->sync ); release_object( server ); }
From: Rémi Bernon rbernon@codeweavers.com
--- server/console.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/server/console.c b/server/console.c index 90da7e8b293..9509248a928 100644 --- a/server/console.c +++ b/server/console.c @@ -211,6 +211,7 @@ struct font_info struct screen_buffer { struct object obj; /* object header */ + struct event_sync *sync; /* sync object for wait/signal */ struct list entry; /* entry in list of all screen buffers */ struct console *input; /* associated console input */ unsigned int id; /* buffer id */ @@ -220,8 +221,8 @@ struct screen_buffer
static void screen_buffer_dump( struct object *obj, int verbose ); static void screen_buffer_destroy( struct object *obj ); -static int screen_buffer_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *screen_buffer_get_fd( struct object *obj ); +static struct object *screen_buffer_get_sync( struct object *obj ); static struct object *screen_buffer_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options );
@@ -230,13 +231,13 @@ static const struct object_ops screen_buffer_ops = sizeof(struct screen_buffer), /* size */ &file_type, /* type */ screen_buffer_dump, /* dump */ - add_queue, /* add_queue */ - remove_queue, /* remove_queue */ - screen_buffer_signaled, /* signaled */ - no_satisfied, /* satisfied */ + NULL, /* add_queue */ + NULL, /* remove_queue */ + NULL, /* signaled */ + NULL, /* satisfied */ no_signal, /* signal */ screen_buffer_get_fd, /* get_fd */ - default_get_sync, /* get_sync */ + screen_buffer_get_sync, /* get_sync */ default_map_access, /* map_access */ default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ @@ -644,9 +645,8 @@ static struct object *create_screen_buffer( struct console *console ) return NULL; }
- if (!(screen_buffer = alloc_object( &screen_buffer_ops ))) - return NULL; - + if (!(screen_buffer = alloc_object( &screen_buffer_ops ))) return NULL; + screen_buffer->sync = (struct event_sync *)grab_object( console->sync ); screen_buffer->id = ++console->last_id; screen_buffer->input = console; init_async_queue( &screen_buffer->ioctl_q ); @@ -777,7 +777,11 @@ static void console_destroy( struct object *obj ) LIST_FOR_EACH_ENTRY( output, &console->outputs, struct console_output, entry ) output->console = NULL;
- if (console->sync) release_object( console->sync ); + if (console->sync) + { + reset_sync( console->sync ); + release_object( console->sync ); + }
free_async_queue( &console->ioctl_q ); free_async_queue( &console->read_q ); @@ -857,18 +861,11 @@ static void screen_buffer_destroy( struct object *obj ) queue_host_ioctl( screen_buffer->input->server, IOCTL_CONDRV_CLOSE_OUTPUT, screen_buffer->id, NULL, NULL ); } + if (screen_buffer->sync) release_object( screen_buffer->sync ); if (screen_buffer->fd) release_object( screen_buffer->fd ); free_async_queue( &screen_buffer->ioctl_q ); }
-static int screen_buffer_signaled( struct object *obj, struct wait_queue_entry *entry ) -{ - struct screen_buffer *screen_buffer = (struct screen_buffer *)obj; - assert( obj->ops == &screen_buffer_ops ); - if (!screen_buffer->input) return 0; - return screen_buffer->input->signaled; -} - static struct object *screen_buffer_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options ) { @@ -885,6 +882,13 @@ static struct fd *screen_buffer_get_fd( struct object *obj ) return NULL; }
+static struct object *screen_buffer_get_sync( struct object *obj ) +{ + struct screen_buffer *screen_buffer = (struct screen_buffer *)obj; + assert( obj->ops == &screen_buffer_ops ); + return grab_object( screen_buffer->sync ); +} + static void console_server_dump( struct object *obj, int verbose ) { assert( obj->ops == &console_server_ops ); @@ -1567,7 +1571,6 @@ struct object *create_console_device( struct object *root, const struct unicode_ DECL_HANDLER(get_next_console_request) { struct console_host_ioctl *ioctl = NULL, *next; - struct screen_buffer *screen_buffer; struct console_server *server; struct console_output *output; struct console_input *input; @@ -1594,8 +1597,6 @@ DECL_HANDLER(get_next_console_request) { server->console->signaled = 1; signal_sync( server->console->sync ); - LIST_FOR_EACH_ENTRY( screen_buffer, &server->console->screen_buffers, struct screen_buffer, entry ) - wake_up( &screen_buffer->obj, 0 ); LIST_FOR_EACH_ENTRY( input, &server->console->inputs, struct console_input, entry ) wake_up( &input->obj, 0 ); LIST_FOR_EACH_ENTRY( output, &server->console->outputs, struct console_output, entry )
From: Rémi Bernon rbernon@codeweavers.com
--- server/console.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/server/console.c b/server/console.c index 9509248a928..7b8352c759e 100644 --- a/server/console.c +++ b/server/console.c @@ -304,16 +304,17 @@ static const struct object_ops console_device_ops = struct console_input { struct object obj; /* object header */ + struct event_sync *sync; /* sync object for wait/signal */ struct fd *fd; /* pseudo-fd */ struct list entry; /* entry in console->inputs */ struct console *console; /* associated console at creation time */ };
static void console_input_dump( struct object *obj, int verbose ); -static int console_input_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct object *console_input_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options ); static struct fd *console_input_get_fd( struct object *obj ); +static struct object *console_input_get_sync( struct object *obj ); static void console_input_destroy( struct object *obj );
static const struct object_ops console_input_ops = @@ -321,13 +322,13 @@ static const struct object_ops console_input_ops = sizeof(struct console_input), /* size */ &device_type, /* type */ console_input_dump, /* dump */ - add_queue, /* add_queue */ - remove_queue, /* remove_queue */ - console_input_signaled, /* signaled */ - no_satisfied, /* satisfied */ + NULL, /* add_queue */ + NULL, /* remove_queue */ + NULL, /* signaled */ + NULL, /* satisfied */ no_signal, /* signal */ console_input_get_fd, /* get_fd */ - default_get_sync, /* get_sync */ + console_input_get_sync, /* get_sync */ default_map_access, /* map_access */ default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ @@ -1350,6 +1351,7 @@ static struct object *console_device_lookup_name( struct object *obj, struct uni
name->len = 0; if (!(console_input = alloc_object( &console_input_ops ))) return NULL; + console_input->sync = (struct event_sync *)grab_object( current->process->console->sync ); console_input->fd = alloc_pseudo_fd( &console_input_fd_ops, &console_input->obj, FILE_SYNCHRONOUS_IO_NONALERT ); if (!console_input->fd) @@ -1436,19 +1438,18 @@ static void console_input_dump( struct object *obj, int verbose ) fputs( "console Input device\n", stderr ); }
-static int console_input_signaled( struct object *obj, struct wait_queue_entry *entry ) +static struct fd *console_input_get_fd( struct object *obj ) { struct console_input *console_input = (struct console_input *)obj; assert( obj->ops == &console_input_ops ); - if (!console_input->console) return 0; - return console_input->console->signaled; + return (struct fd *)grab_object( console_input->fd ); }
-static struct fd *console_input_get_fd( struct object *obj ) +static struct object *console_input_get_sync( struct object *obj ) { struct console_input *console_input = (struct console_input *)obj; assert( obj->ops == &console_input_ops ); - return (struct fd *)grab_object( console_input->fd ); + return grab_object( console_input->sync ); }
static struct object *console_input_open_file( struct object *obj, unsigned int access, @@ -1464,6 +1465,7 @@ static void console_input_destroy( struct object *obj ) assert( obj->ops == &console_input_ops ); if (console_input->fd) release_object( console_input->fd ); if (console_input->console) list_remove( &console_input->entry ); + if (console_input->sync) release_object( console_input->sync ); }
static void console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) @@ -1573,7 +1575,6 @@ DECL_HANDLER(get_next_console_request) struct console_host_ioctl *ioctl = NULL, *next; struct console_server *server; struct console_output *output; - struct console_input *input; struct iosb *iosb = NULL;
server = (struct console_server *)get_handle_obj( current->process, req->handle, 0, &console_server_ops ); @@ -1597,8 +1598,6 @@ DECL_HANDLER(get_next_console_request) { server->console->signaled = 1; signal_sync( server->console->sync ); - LIST_FOR_EACH_ENTRY( input, &server->console->inputs, struct console_input, entry ) - wake_up( &input->obj, 0 ); LIST_FOR_EACH_ENTRY( output, &server->console->outputs, struct console_output, entry ) wake_up( &output->obj, 0 ); }
This merge request was approved by Rémi Bernon.
From: Rémi Bernon rbernon@codeweavers.com
--- server/console.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/server/console.c b/server/console.c index 7b8352c759e..a8e14d70cc0 100644 --- a/server/console.c +++ b/server/console.c @@ -365,14 +365,15 @@ static const struct fd_ops console_input_fd_ops = struct console_output { struct object obj; /* object header */ + struct event_sync *sync; /* sync object for wait/signal */ struct fd *fd; /* pseudo-fd */ struct list entry; /* entry in console->outputs */ struct console *console; /* associated console at creation time */ };
static void console_output_dump( struct object *obj, int verbose ); -static int console_output_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *console_output_get_fd( struct object *obj ); +static struct object *console_output_get_sync( struct object *obj ); static struct object *console_output_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options ); static void console_output_destroy( struct object *obj ); @@ -382,13 +383,13 @@ static const struct object_ops console_output_ops = sizeof(struct console_output), /* size */ &device_type, /* type */ console_output_dump, /* dump */ - add_queue, /* add_queue */ - remove_queue, /* remove_queue */ - console_output_signaled, /* signaled */ - no_satisfied, /* satisfied */ + NULL, /* add_queue */ + NULL, /* remove_queue */ + NULL, /* signaled */ + NULL, /* satisfied */ no_signal, /* signal */ console_output_get_fd, /* get_fd */ - default_get_sync, /* get_sync */ + console_output_get_sync, /* get_sync */ default_map_access, /* map_access */ default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ @@ -1376,6 +1377,7 @@ static struct object *console_device_lookup_name( struct object *obj, struct uni
name->len = 0; if (!(console_output = alloc_object( &console_output_ops ))) return NULL; + console_output->sync = (struct event_sync *)grab_object( current->process->console->sync ); console_output->fd = alloc_pseudo_fd( &console_output_fd_ops, &console_output->obj, FILE_SYNCHRONOUS_IO_NONALERT ); if (!console_output->fd) @@ -1509,19 +1511,18 @@ static void console_output_dump( struct object *obj, int verbose ) fputs( "console Output device\n", stderr ); }
-static int console_output_signaled( struct object *obj, struct wait_queue_entry *entry ) +static struct fd *console_output_get_fd( struct object *obj ) { struct console_output *console_output = (struct console_output *)obj; assert( obj->ops == &console_output_ops ); - if (!console_output->console) return 0; - return console_output->console->signaled; + return (struct fd *)grab_object( console_output->fd ); }
-static struct fd *console_output_get_fd( struct object *obj ) +static struct object *console_output_get_sync( struct object *obj ) { struct console_output *console_output = (struct console_output *)obj; assert( obj->ops == &console_output_ops ); - return (struct fd *)grab_object( console_output->fd ); + return grab_object( console_output->sync ); }
static struct object *console_output_open_file( struct object *obj, unsigned int access, @@ -1537,6 +1538,7 @@ static void console_output_destroy( struct object *obj ) assert( obj->ops == &console_output_ops ); if (console_output->fd) release_object( console_output->fd ); if (console_output->console) list_remove( &console_output->entry ); + if (console_output->sync) release_object( console_output->sync ); }
static void console_output_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) @@ -1574,7 +1576,6 @@ DECL_HANDLER(get_next_console_request) { struct console_host_ioctl *ioctl = NULL, *next; struct console_server *server; - struct console_output *output; struct iosb *iosb = NULL;
server = (struct console_server *)get_handle_obj( current->process, req->handle, 0, &console_server_ops ); @@ -1598,8 +1599,6 @@ DECL_HANDLER(get_next_console_request) { server->console->signaled = 1; signal_sync( server->console->sync ); - LIST_FOR_EACH_ENTRY( output, &server->console->outputs, struct console_output, entry ) - wake_up( &output->obj, 0 ); }
if (req->read)
From: Rémi Bernon rbernon@codeweavers.com
--- server/console.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/server/console.c b/server/console.c index a8e14d70cc0..8f01311892f 100644 --- a/server/console.c +++ b/server/console.c @@ -54,7 +54,6 @@ struct console { struct object obj; /* object header */ struct event_sync *sync; /* sync object for wait/signal */ - int signaled; /* is console signaled */ struct thread *renderer; /* console renderer thread */ struct screen_buffer *active; /* active screen buffer */ struct console_server *server; /* console server object */ @@ -545,7 +544,6 @@ static struct object *create_console(void) if (!(console = alloc_object( &console_ops ))) return NULL; console->sync = NULL; console->renderer = NULL; - console->signaled = 0; console->active = NULL; console->server = NULL; console->fd = NULL; @@ -1590,16 +1588,8 @@ DECL_HANDLER(get_next_console_request)
if (!server->console->renderer) server->console->renderer = current;
- if (!req->signal) - { - server->console->signaled = 0; - reset_sync( server->console->sync ); - } - else if (!server->console->signaled) - { - server->console->signaled = 1; - signal_sync( server->console->sync ); - } + if (!req->signal) reset_sync( server->console->sync ); + else signal_sync( server->console->sync );
if (req->read) {