big rename — we're libfringe now

This commit is contained in:
edef 2015-04-16 08:06:57 -04:00
parent af7e9ea67c
commit d627f0d725
21 changed files with 34 additions and 12 deletions

View File

@ -1,5 +1,5 @@
[package]
name = "lwkt"
name = "fringe"
version = "0.0.1"
authors = ["edef <edef@edef.eu>"]
build = "build.rs"

View File

@ -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

View File

@ -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)

View File

@ -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)]

View File

@ -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;

View File

@ -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;

View File

@ -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!");

View File

@ -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::*;

View File

@ -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::*;

View File

@ -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.

View File

@ -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::*;

View File

@ -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.

View File

@ -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::*;

View File

@ -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::*;

View File

@ -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::*;

View File

@ -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)]

View File

@ -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)]

View File

@ -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.

View File

@ -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};

View File

@ -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;

View File

@ -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.