···305305int __darling_thread_terminate(void* stackaddr,
306306 unsigned long freesize, unsigned long pthobj_size)
307307{
308308+ if (dserver_rpc_checkout(-1, false) < 0) {
309309+ // failing to checkout is not fatal.
310310+ // it's not ideal, but it's not fatal.
311311+ #define CHECKOUT_FAILURE_MESSAGE "Failed to checkout"
312312+ dserver_rpc_kprintf(CHECKOUT_FAILURE_MESSAGE, sizeof(CHECKOUT_FAILURE_MESSAGE) - 1);
313313+ }
314314+308315 if (getpid() == syscall(SYS_gettid))
309316 {
310317 // dispatch_main() calls pthread_exit(NULL) on the main thread,
···315322316323 while (1)
317324 sigsuspend(&mask);
318318- }
319319-320320- // only threads that aren't the main thread should checkout
321321- // the main thread will automatically checkout when the process dies
322322- if (dserver_rpc_checkout(-1, false) < 0) {
323323- // failing to checkout is not fatal.
324324- // it's not ideal, but it's not fatal.
325325- #define CHECKOUT_FAILURE_MESSAGE "Failed to checkout"
326326- dserver_rpc_kprintf(CHECKOUT_FAILURE_MESSAGE, sizeof(CHECKOUT_FAILURE_MESSAGE) - 1);
327325 }
328326329327 t_freeaddr = stackaddr;