done = sd->async.done;
sd->async.todo = NULL;
sd->async.done = NULL;
- eina_spinlock_release(&sd->async.lck);
if (done) _async_open_data_free(done);
- if (!todo) return;
+ if (!todo)
+ {
+ eina_spinlock_release(&sd->async.lck);
+ return;
+ }
begin:
if (todo->f_set)
if (!f)
{
todo->failed = EINA_TRUE;
- eina_spinlock_take(&sd->async.lck);
sd->async.done = todo;
eina_spinlock_release(&sd->async.lck);
return;
else
{
CRI("Async open has no input file!");
+ eina_spinlock_release(&sd->async.lck);
return;
}
{
if (!todo->f_set) eina_file_close(f);
_async_open_data_free(todo);
+ eina_spinlock_release(&sd->async.lck);
return;
}
if (map) eina_file_map_free(f, map);
if (!todo->f_set) eina_file_close(f);
_async_open_data_free(todo);
+ eina_spinlock_release(&sd->async.lck);
return;
}
done->f_open = f;
done->map = map;
- eina_spinlock_take(&sd->async.lck);
todo = sd->async.todo;
sd->async.todo = NULL;
if (!todo) sd->async.done = done;
- eina_spinlock_release(&sd->async.lck);
if (todo)
{
_async_open_data_free(done);
goto begin;
}
+ eina_spinlock_release(&sd->async.lck);
}
static void