This repository was archived by the owner on Sep 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +63
-32
lines changed Expand file tree Collapse file tree 5 files changed +63
-32
lines changed Original file line number Diff line number Diff line change 1+ name : Makefile CI
2+
3+ on :
4+ push :
5+ branches : [ "nightly" ]
6+ pull_request :
7+ branches : [ "nitghly" ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ submodules : ' recursive'
18+
19+ - name : Install Rust toolchain
20+ uses : actions-rs/toolchain@v1
21+ with :
22+ profile : minimal
23+ toolchain : nightly
24+ override : true
25+ target : x86_64-unknown-none
26+ components : rust-src
27+
28+ - name : Add rust-src
29+ run : rustup component add rust-src --toolchain nightly-2025-04-03-x86_64-unknown-linux-gnu
30+
31+ - name : Update Debian repositories
32+ run : sudo apt-get update
33+
34+ - name : Setup nasm
35+ run : sudo apt-get install -y nasm
36+
37+ - name : Install xorriso
38+ run : sudo apt-get install -y xorriso
39+
40+ - name : Install qemu
41+ run : sudo apt-get install qemu-system-x86
42+
43+ - name : Run make
44+ run : make
45+
46+ - uses : actions/upload-artifact@v4
47+ with :
48+ name : ' hexium.iso'
49+ path : ' hexium-x86_64.iso'
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ bitflags = "2.9.1"
99elf = { version = " 0.7" , default-features = false , features = [" nightly" ] }
1010flanterm = " 0.0.2"
1111limine = " 0.5"
12- lazy_static = { version = " 1.0" , features = [" spin_no_std" ] }
1312rustc-demangle = " 0.1"
1413spin = " 0.10.0"
1514talc = " 4.4.3"
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ use core::{
99 marker:: PhantomData ,
1010 ops:: { Index , IndexMut } ,
1111} ;
12+ use spin:: Lazy ;
1213
1314#[ allow( dead_code) ]
1415#[ repr( C , align( 16 ) ) ]
@@ -311,14 +312,14 @@ impl_handler_func_type!(HandlerFuncWithErrCode);
311312impl_handler_func_type ! ( DivergingHandlerFunc ) ;
312313impl_handler_func_type ! ( DivergingHandlerFuncWithErrCode ) ;
313314
314- lazy_static :: lazy_static! {
315- static ref IDT : InterruptDescriptorTable = {
316- let mut idt = InterruptDescriptorTable :: new ( ) ;
317- idt . double_fault . set_handler_fn( exceptions:: double_fault_handler) ;
318- idt. page_fault. set_handler_fn ( exceptions :: page_fault_handler ) ;
319- idt
320- } ;
321- }
315+ static IDT : Lazy < InterruptDescriptorTable > = Lazy :: new ( || {
316+ let mut idt = InterruptDescriptorTable :: new ( ) ;
317+ idt. double_fault
318+ . set_handler_fn ( exceptions:: double_fault_handler) ;
319+ idt. page_fault
320+ . set_handler_fn ( exceptions :: page_fault_handler ) ;
321+ idt
322+ } ) ;
322323
323324pub fn init ( ) {
324325 IDT . load ( ) ;
Original file line number Diff line number Diff line change 11use crate :: util:: option_to_c_void;
22use core:: { fmt, ptr} ;
3- use spin:: Mutex ;
3+ use spin:: { Lazy , Mutex } ;
44
55pub struct FlantermContext ( pub * mut flanterm:: sys:: flanterm_context ) ;
66unsafe impl Send for FlantermContext { }
@@ -45,11 +45,9 @@ pub fn init() {
4545 crate :: trace!( "Initialized Flanterm context" ) ;
4646}
4747
48- lazy_static:: lazy_static! {
49- pub static ref FLANTERM_CTX : Mutex <FlantermContext > =
50- Mutex :: new( FlantermContext ( ptr:: null_mut( ) ) ) ;
51- pub static ref WRITER : Mutex <FlantermWriter > = Mutex :: new( FlantermWriter { } ) ;
52- }
48+ pub static FLANTERM_CTX : Lazy < Mutex < FlantermContext > > =
49+ Lazy :: new ( || Mutex :: new ( FlantermContext ( ptr:: null_mut ( ) ) ) ) ;
50+ pub static WRITER : Lazy < Mutex < FlantermWriter > > = Lazy :: new ( || Mutex :: new ( FlantermWriter { } ) ) ;
5351
5452pub struct FlantermWriter { }
5553
You can’t perform that action at this time.
0 commit comments