This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-library (rope) | |
(import (core records) | |
(core optargs)) | |
(export | |
*short-leaf* | |
*long-leaf* | |
rope? | |
branch? | |
leaf? | |
make-rope |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{ | |
cell::{RefCell, UnsafeCell}, | |
marker::PhantomData, | |
mem::{ManuallyDrop, MaybeUninit}, | |
sync::{ | |
Arc, | |
atomic::{ | |
AtomicBool, AtomicI8, AtomicI32, AtomicU8, AtomicU32, AtomicU64, AtomicUsize, Ordering, | |
}, | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use super::semaphore::Sem; | |
use std::sync::atomic::AtomicUsize; | |
use std::sync::atomic::{self, Ordering}; | |
/// Synchronization primitive inspired by RCU. | |
/// | |
/// Any number of threads may enter critical sections associated with a | |
/// synchronizer object. One (at a time) other thread may wait for the | |
/// completion of all critical sections for the synchronizer object | |
/// that were extant when the wait was initiated. Usage is that there |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(dead_code)] | |
impl ValueSlot { | |
const TAG_UNTAGGED: usize = 0x0; | |
const TAG_TAGGED: usize = 0x1; | |
/* some extra tags are available in case we need them in future */ | |
const TAG_UNUSED0: usize = 0x2; | |
const TAG_UNUSED1: usize = 0x3; | |
const TAG_UNUSED2: usize = 0x4; | |
const TAG_UNUSED3: usize = 0x5; | |
const TAG_UNUSED4: usize = 0x6; |