/* If the aio_fsync() function fails or aiocbp indicates an error condition, data is not guaranteed to have been successfully transferred.  */
static void aio_fync_work(struct rt_work *work, void *work_data)
/* If the aio_fsync() function fails or aiocbp indicates an error condition, data is not guaranteed to have been successfully transferred.  */
static void aio_fync_work(struct rt_work *work, void *work_data)
{
    int result;
    rt_base_t level;
    struct aiocb *cb = (struct aiocb*)work_data;
    RT_ASSERT(cb != RT_NULL);
    result = fsync(cb->aio_fildes);
    level = rt_hw_interrupt_disable();
    if (result < 0)
        cb->aio_result = errno;
    else
        cb->aio_result = 0;
    rt_hw_interrupt_enable(level);
    return ;
}