HEX
Server: LiteSpeed
System: Linux CentOS-79-64-minimal 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: vishn3436 (5293)
PHP: 8.0.15
Disabled: NONE
Upload Files
File: //usr/src/dattobd-0.11.2/bio_queue.h
// SPDX-License-Identifier: GPL-2.0-only

/*
 * Copyright (C) 2022 Datto Inc.
 */

#ifndef BIO_QUEUE_H_
#define BIO_QUEUE_H_

#include "includes.h"

struct bio_queue {
        struct bio_list bios;
        spinlock_t lock;
        wait_queue_head_t event;
};

void bio_queue_init(struct bio_queue *bq);

int bio_queue_empty(const struct bio_queue *bq);

void bio_queue_add(struct bio_queue *bq, struct bio *bio);

struct bio *bio_queue_dequeue(struct bio_queue *bq);

struct bio *bio_queue_dequeue_delay_read(struct bio_queue *bq);

#endif /* BIO_QUEUE_H_ */