big rename — we're libfringe now
This commit is contained in:
parent
af7e9ea67c
commit
d627f0d725
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "lwkt"
|
||||
name = "fringe"
|
||||
version = "0.0.1"
|
||||
authors = ["edef <edef@edef.eu>"]
|
||||
build = "build.rs"
|
||||
|
|
1
LICENSE
1
LICENSE
|
@ -1,3 +1,4 @@
|
|||
libfringe, a low-level green threading library.
|
||||
Copyright (c) 2015, edef <edef@edef.eu>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
#![feature(test)]
|
||||
extern crate test;
|
||||
extern crate lwkt;
|
||||
use lwkt::{Context, Stack};
|
||||
extern crate fringe;
|
||||
use fringe::{Context, Stack};
|
||||
|
||||
static mut ctx_slot: *mut Context<'static, SliceStack<'static>> = 0 as *mut Context<_>;
|
||||
static mut stack_buf: [u8; 1024] = [0; 1024];
|
||||
|
@ -27,7 +28,7 @@ fn context_new(b: &mut test::Bencher) {
|
|||
}
|
||||
|
||||
struct SliceStack<'a>(&'a mut [u8]);
|
||||
impl<'a> lwkt::Stack for SliceStack<'a> {
|
||||
impl<'a> fringe::Stack for SliceStack<'a> {
|
||||
fn top(&mut self) -> *mut u8 {
|
||||
unsafe {
|
||||
self.0.as_mut_ptr().offset(self.0.len() as isize)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
#![feature(asm, test)]
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
#![feature(test)]
|
||||
extern crate test;
|
||||
extern crate lwkt;
|
||||
use lwkt::Context;
|
||||
extern crate fringe;
|
||||
use fringe::Context;
|
||||
|
||||
static mut ctx_slot: *mut Context<'static, lwkt::OsStack> = 0 as *mut Context<_>;
|
||||
static mut ctx_slot: *mut Context<'static, fringe::OsStack> = 0 as *mut Context<_>;
|
||||
|
||||
#[bench]
|
||||
fn swap(b: &mut test::Bencher) {
|
||||
unsafe {
|
||||
let stack = lwkt::OsStack::new(4 << 20).unwrap();
|
||||
let stack = fringe::OsStack::new(4 << 20).unwrap();
|
||||
|
||||
let mut ctx = Context::new(stack, move || {
|
||||
let ctx_ptr = ctx_slot;
|
||||
|
|
1
build.rs
1
build.rs
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
extern crate gcc;
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
#![feature(thread_local)]
|
||||
extern crate lwkt;
|
||||
use lwkt::Context;
|
||||
extern crate fringe;
|
||||
use fringe::Context;
|
||||
|
||||
#[thread_local]
|
||||
static mut ctx_slot: *mut Context<'static, lwkt::OsStack> = 0 as *mut Context<_>;
|
||||
static mut ctx_slot: *mut Context<'static, fringe::OsStack> = 0 as *mut Context<_>;
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
let stack = lwkt::OsStack::new(4 << 20).unwrap();
|
||||
let stack = fringe::OsStack::new(4 << 20).unwrap();
|
||||
|
||||
let mut ctx = Context::new(stack, move || {
|
||||
println!("it's alive!");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
use core::prelude::*;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
use core::prelude::*;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
use core::prelude::*;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
use core::prelude::*;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
use core::prelude::*;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
pub use self::imp::*;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
#![allow(non_camel_case_types)]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
#![feature(no_std)]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
use core::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
extern crate libc;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file is part of libfringe, a low-level green threading library.
|
||||
// Copyright (c) 2015, edef <edef@edef.eu>
|
||||
// See the LICENSE file included in this distribution.
|
||||
//! Traits for stacks.
|
||||
|
|
Loading…
Reference in New Issue