// zvfs_sysinit.c
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif

#include "common/config.h"
#include "zvfs_sys_init.h"
#include "fs/zvfs.h"                // zvfs_fs_init
#include "spdk_engine/io_engine.h"

#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>

static pthread_once_t  _init_once  = PTHREAD_ONCE_INIT;
static int             _init_ok    = 0;

static void
do_init(void)
{
    _init_ok = 1;
}

void
zvfs_ensure_init(void)
{
    pthread_once(&_init_once, do_init);
}