From d627f0d725ef28242e1bd735ff59e2f9893adde4 Mon Sep 17 00:00:00 2001 From: edef Date: Thu, 16 Apr 2015 08:06:57 -0400 Subject: [PATCH] =?UTF-8?q?big=20rename=20=E2=80=94=20we're=20libfringe=20?= =?UTF-8?q?now?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 2 +- LICENSE | 1 + benches/context_new.rs | 7 ++++--- benches/kernel_swap.rs | 1 + benches/swap.rs | 9 +++++---- build.rs | 1 + examples/basic.rs | 11 +++++++---- src/arch/common.rs | 1 + src/arch/mod.rs | 1 + src/arch/x86_64/init.s | 1 + src/arch/x86_64/mod.rs | 1 + src/arch/x86_64/swap.s | 1 + src/context.rs | 1 + src/debug/mod.rs | 1 + src/debug/valgrind/mod.rs | 1 + src/debug/valgrind/native.rs | 1 + src/lib.rs | 1 + src/os/mod.rs | 1 + src/os/sys/mod.rs | 1 + src/os/sys/unix.rs | 1 + src/stack.rs | 1 + 21 files changed, 34 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f0c389..a25505c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "lwkt" +name = "fringe" version = "0.0.1" authors = ["edef "] build = "build.rs" diff --git a/LICENSE b/LICENSE index a34d1cc..8dc0b5a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ +libfringe, a low-level green threading library. Copyright (c) 2015, edef Permission to use, copy, modify, and/or distribute this software for any diff --git a/benches/context_new.rs b/benches/context_new.rs index 7b39651..1f81e11 100644 --- a/benches/context_new.rs +++ b/benches/context_new.rs @@ -1,9 +1,10 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // 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) diff --git a/benches/kernel_swap.rs b/benches/kernel_swap.rs index 67763f2..2fe8b65 100644 --- a/benches/kernel_swap.rs +++ b/benches/kernel_swap.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. #![feature(asm, test)] diff --git a/benches/swap.rs b/benches/swap.rs index a0456c6..6f83999 100644 --- a/benches/swap.rs +++ b/benches/swap.rs @@ -1,16 +1,17 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // 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; diff --git a/build.rs b/build.rs index d7d36b4..61ca8c0 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. extern crate gcc; diff --git a/examples/basic.rs b/examples/basic.rs index d1cb6d7..a42e20a 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -1,13 +1,16 @@ +// This file is part of libfringe, a low-level green threading library. +// Copyright (c) 2015, edef +// 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!"); diff --git a/src/arch/common.rs b/src/arch/common.rs index 907e01a..8207806 100644 --- a/src/arch/common.rs +++ b/src/arch/common.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. use core::prelude::*; diff --git a/src/arch/mod.rs b/src/arch/mod.rs index 9d3242b..894a018 100644 --- a/src/arch/mod.rs +++ b/src/arch/mod.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. use core::prelude::*; diff --git a/src/arch/x86_64/init.s b/src/arch/x86_64/init.s index 071a15f..7faa2e5 100644 --- a/src/arch/x86_64/init.s +++ b/src/arch/x86_64/init.s @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. diff --git a/src/arch/x86_64/mod.rs b/src/arch/x86_64/mod.rs index 73625e8..26b674d 100644 --- a/src/arch/x86_64/mod.rs +++ b/src/arch/x86_64/mod.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. use core::prelude::*; diff --git a/src/arch/x86_64/swap.s b/src/arch/x86_64/swap.s index ae6dc38..2dc9250 100644 --- a/src/arch/x86_64/swap.s +++ b/src/arch/x86_64/swap.s @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. diff --git a/src/context.rs b/src/context.rs index 4a8ca41..d6586e0 100644 --- a/src/context.rs +++ b/src/context.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. use core::prelude::*; diff --git a/src/debug/mod.rs b/src/debug/mod.rs index b215b98..5f0affe 100644 --- a/src/debug/mod.rs +++ b/src/debug/mod.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. use core::prelude::*; diff --git a/src/debug/valgrind/mod.rs b/src/debug/valgrind/mod.rs index 1295239..525ab07 100644 --- a/src/debug/valgrind/mod.rs +++ b/src/debug/valgrind/mod.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. pub use self::imp::*; diff --git a/src/debug/valgrind/native.rs b/src/debug/valgrind/native.rs index 9566851..2d638a9 100644 --- a/src/debug/valgrind/native.rs +++ b/src/debug/valgrind/native.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. #![allow(non_camel_case_types)] diff --git a/src/lib.rs b/src/lib.rs index 71d1a15..3e98b90 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. #![feature(no_std)] diff --git a/src/os/mod.rs b/src/os/mod.rs index d8c582f..5935726 100644 --- a/src/os/mod.rs +++ b/src/os/mod.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. diff --git a/src/os/sys/mod.rs b/src/os/sys/mod.rs index 0d0c0aa..5894e84 100644 --- a/src/os/sys/mod.rs +++ b/src/os/sys/mod.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. use core::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; diff --git a/src/os/sys/unix.rs b/src/os/sys/unix.rs index 711b580..f85c700 100644 --- a/src/os/sys/unix.rs +++ b/src/os/sys/unix.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. extern crate libc; diff --git a/src/stack.rs b/src/stack.rs index a4d66a5..a926ba9 100644 --- a/src/stack.rs +++ b/src/stack.rs @@ -1,3 +1,4 @@ +// This file is part of libfringe, a low-level green threading library. // Copyright (c) 2015, edef // See the LICENSE file included in this distribution. //! Traits for stacks.