1.1 --- a/resource_server.cc Thu Mar 11 23:50:20 2021 +0100
1.2 +++ b/resource_server.cc Thu Mar 11 23:51:02 2021 +0100
1.3 @@ -52,12 +52,17 @@
1.4 {
1.5 pthread_t thread;
1.6 pthread_attr_t attr;
1.7 + long err;
1.8
1.9 pthread_attr_init(&attr);
1.10 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
1.11
1.12 resource_init_config(_config, _resource);
1.13 - pthread_create(&thread, &attr, ipc_server_start_mainloop, _config);
1.14 +
1.15 + err = pthread_create(&thread, &attr, ipc_server_start_mainloop, _config);
1.16 + if (err)
1.17 + return err;
1.18 +
1.19 resource_set_config_threaded(_config, pthread_l4_cap(thread), 1);
1.20
1.21 return resource_start_config(_config, _resource);
1.22 @@ -122,3 +127,5 @@
1.23 ipc_server_finalise_config(config);
1.24 delete config;
1.25 }
1.26 +
1.27 +// vim: tabstop=2 expandtab shiftwidth=2