/* This function will create a ring fifo for ulog. */
int uring_fifo_init()
/* This function will create a ring fifo for ulog. */
int uring_fifo_init()
{
    int rc = -1;
    if (ulog_buffer == NULL) {
        ulog_buffer = aos_malloc(DEFAULT_ASYNC_BUF_SIZE);
        if (ulog_buffer != NULL) {
            rc = aos_queue_new(&ulog_queue, ulog_buffer, DEFAULT_ASYNC_BUF_SIZE, ULOG_SIZE);
            if (0 != rc) {
                aos_free(ulog_buffer);
                ulog_buffer = NULL;
            }
        }
    }
    return rc;
}