pthread_detach() function was returning 0 even when not calling
lthread_detach(), due to missing braces in conditional
(extra indentation was applied, giving a hint this is the correct fix).
Fixes:
433ba6228f9a ("examples/performance-thread: add pthread_shim app")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
if (override) {
struct lthread *lt = (struct lthread *)tid;
- if (lt == lthread_current())
+ if (lt == lthread_current()) {
lthread_detach();
return 0;
+ }
NOT_IMPLEMENTED;
}
return _sys_pthread_funcs.f_pthread_detach(tid);