#ifndef __ZVFS_IPC_CQ_H__
#define __ZVFS_IPC_CQ_H__

#include "proto/ipc_proto.h"
#include <pthread.h>


struct cq_item {
    struct zvfs_resp *resp;
    struct cq_item *next;
};

struct cq {
    struct cq_item *head;
    struct cq_item *tail;
    pthread_mutex_t lock;
};

struct cq *CQ_Create(void);
void CQ_Destroy(struct cq *q);
void CQ_Push(struct cq *q, struct zvfs_resp *resp);
struct zvfs_resp *CQ_Pop(struct cq *q);

extern struct cq *g_cq;

#endif