Sha256: f05047f27ffede2e43a217e2c98498253c77ce31e1569169d6193f79beb262ef

Contents?: true

Size: 1.17 KB

Versions: 16

Compression:

Stored size: 1.17 KB

Contents

/**
 * hdr_writer_reader_phaser.h
 * Written by Michael Barker and released to the public domain,
 * as explained at http://creativecommons.org/publicdomain/zero/1.0/
 */

#ifndef HDR_WRITER_READER_PHASER_H
#define HDR_WRITER_READER_PHASER_H 1

#include <stdlib.h>
#include <stdbool.h>
#include <stdlib.h>
#include <errno.h>

#include "hdr_thread.h"

HDR_ALIGN_PREFIX(8) 
struct hdr_writer_reader_phaser
{
    int64_t start_epoch;
    int64_t even_end_epoch;
    int64_t odd_end_epoch;
    hdr_mutex* reader_mutex;
} 
HDR_ALIGN_SUFFIX(8);

#ifdef __cplusplus
extern "C" {
#endif

    int hdr_writer_reader_phaser_init(struct hdr_writer_reader_phaser* p);

    void hdr_writer_reader_phaser_destroy(struct hdr_writer_reader_phaser* p);

    int64_t hdr_phaser_writer_enter(struct hdr_writer_reader_phaser* p);

    void hdr_phaser_writer_exit(
    struct hdr_writer_reader_phaser* p, int64_t critical_value_at_enter);

    void hdr_phaser_reader_lock(struct hdr_writer_reader_phaser* p);

    void hdr_phaser_reader_unlock(struct hdr_writer_reader_phaser* p);

    void hdr_phaser_flip_phase(
    struct hdr_writer_reader_phaser* p, int64_t sleep_time_ns);

#ifdef __cplusplus
}
#endif

#endif

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
couchbase-3.5.6 ext/cache/hdr_histogram/8aac176f50c5d02f8248eb1608d208220a4bc076/hdr_histogram/include/hdr/hdr_writer_reader_phaser.h
couchbase-3.5.5 ext/cache/hdr_histogram/8aac176f50c5d02f8248eb1608d208220a4bc076/hdr_histogram/include/hdr/hdr_writer_reader_phaser.h
couchbase-3.5.4 ext/cache/hdr_histogram/8aac176f50c5d02f8248eb1608d208220a4bc076/hdr_histogram/include/hdr/hdr_writer_reader_phaser.h
couchbase-3.5.3 ext/cache/hdr_histogram/8aac176f50c5d02f8248eb1608d208220a4bc076/hdr_histogram/include/hdr/hdr_writer_reader_phaser.h
couchbase-3.5.2 ext/cache/hdr_histogram/8aac176f50c5d02f8248eb1608d208220a4bc076/hdr_histogram/include/hdr/hdr_writer_reader_phaser.h
couchbase-3.5.1 ext/cache/hdr_histogram/8aac176f50c5d02f8248eb1608d208220a4bc076/hdr_histogram/include/hdr/hdr_writer_reader_phaser.h
couchbase-3.5.0 ext/cache/hdr_histogram/8aac176f50c5d02f8248eb1608d208220a4bc076/hdr_histogram/include/hdr/hdr_writer_reader_phaser.h
couchbase-3.4.5 ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.4.4 ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.4.3 ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.4.2 ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.4.1 ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.4.0 ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.3.0 ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.2.0-universal-darwin-20 ext/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h
couchbase-3.2.0 ext/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h