mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
worker: fix timer queue creation
Timer queue is attached to current thread when created so it must be created from the proper thread. After worker initialization is moved in a following patch to main thread the queue was created in the wrong thread causing program to fail saying that the queue is NULL. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <ulublin@redhat.com>
This commit is contained in:
parent
f55032ecba
commit
0b386603cb
@ -11671,10 +11671,6 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher)
|
||||
spice_warn_if(init_info.n_surfaces > NUM_SURFACES);
|
||||
worker->n_surfaces = init_info.n_surfaces;
|
||||
|
||||
if (!spice_timer_queue_create()) {
|
||||
spice_error("failed to create timer queue");
|
||||
}
|
||||
|
||||
red_init_quic(worker);
|
||||
red_init_lz(worker);
|
||||
red_init_jpeg(worker);
|
||||
@ -11702,6 +11698,10 @@ SPICE_GNUC_NORETURN static void *red_worker_main(void *arg)
|
||||
spice_assert(MAX_PIPE_SIZE > WIDE_CLIENT_ACK_WINDOW &&
|
||||
MAX_PIPE_SIZE > NARROW_CLIENT_ACK_WINDOW); //ensure wakeup by ack message
|
||||
|
||||
if (!spice_timer_queue_create()) {
|
||||
spice_error("failed to create timer queue");
|
||||
}
|
||||
|
||||
if (pthread_getcpuclockid(pthread_self(), &worker->clockid)) {
|
||||
spice_warning("getcpuclockid failed");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user