don't use deprecated g_thread_init/_create
This commit is contained in:
parent
7445ed9158
commit
4ca378df88
|
@ -474,14 +474,12 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
|
||||||
40, receive_data, devc);
|
40, receive_data, devc);
|
||||||
|
|
||||||
/* Run the demo thread. */
|
/* Run the demo thread. */
|
||||||
g_thread_init(NULL);
|
|
||||||
/* This must to be done between g_thread_init() & g_thread_create(). */
|
|
||||||
devc->timer = g_timer_new();
|
devc->timer = g_timer_new();
|
||||||
thread_running = 1;
|
thread_running = 1;
|
||||||
my_thread =
|
my_thread = g_thread_try_new("sigrok demo generator",
|
||||||
g_thread_create((GThreadFunc)thread_func, devc, TRUE, NULL);
|
(GThreadFunc)thread_func, devc, NULL);
|
||||||
if (!my_thread) {
|
if (!my_thread) {
|
||||||
sr_err("demo: %s: g_thread_create failed", __func__);
|
sr_err("demo: %s: g_thread_try_new failed", __func__);
|
||||||
return SR_ERR; /* TODO */
|
return SR_ERR; /* TODO */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue