File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
library/std/src/sys/pal/vexos Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ pub mod os;
15
15
pub mod pipe;
16
16
#[ path = "../unsupported/process.rs" ]
17
17
pub mod process;
18
- #[ path = "../unsupported/stdio.rs" ]
19
18
pub mod stdio;
20
19
#[ path = "../unsupported/thread.rs" ]
21
20
pub mod thread;
@@ -63,7 +62,9 @@ pub extern "C" fn __rust_abort() -> ! {
63
62
64
63
pub unsafe fn init ( _argc : isize , _argv : * const * const u8 , _sigpipe : u8 ) { }
65
64
66
- pub unsafe fn cleanup ( ) { }
65
+ pub unsafe fn cleanup ( ) {
66
+ stdio::
67
+ }
67
68
68
69
pub fn unsupported < T > ( ) -> crate :: io:: Result < T > {
69
70
Err ( unsupported_err ( ) )
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ impl io::Write for Stdout {
52
52
53
53
fn flush ( & mut self ) -> io:: Result < ( ) > {
54
54
unsafe {
55
- vex_sdk:: vexTasksRun ( ) ;
55
+ while ( vex_sdk:: vexSerialWriteFree ( STDIO_CHANNEL ) as usize ) != STDOUT_BUF_SIZE {
56
+ vex_sdk:: vexTasksRun ( ) ;
57
+ }
56
58
}
57
59
58
60
Ok ( ( ) )
@@ -75,7 +77,8 @@ impl io::Write for Stderr {
75
77
}
76
78
}
77
79
78
- pub const STDIN_BUF_SIZE : usize = 0 ;
80
+ pub const STDIN_BUF_SIZE : usize = 4096 ;
81
+ const STDOUT_BUF_SIZE : usize = 2048 ;
79
82
80
83
pub fn is_ebadf ( _err : & io:: Error ) -> bool {
81
84
true
You can’t perform that action at this time.
0 commit comments