File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -184,12 +184,23 @@ pub mod hio;
184184pub mod nr;
185185
186186/// Performs a semihosting operation, takes a pointer to an argument block
187+ ///
188+ /// # Safety
189+ ///
190+ /// The syscall number must be a valid [semihosting operation],
191+ /// and the arguments must be valid for the associated operation.
192+ ///
193+ /// [semihosting operation]: https://developer.arm.com/documentation/dui0471/i/semihosting/semihosting-operations?lang=en
187194#[ inline( always) ]
188195pub unsafe fn syscall < T > ( nr : usize , arg : & T ) -> usize {
189196 syscall1 ( nr, arg as * const T as usize )
190197}
191198
192199/// Performs a semihosting operation, takes one integer as an argument
200+ ///
201+ /// # Safety
202+ ///
203+ /// Same as [`syscall`].
193204#[ inline( always) ]
194205pub unsafe fn syscall1 ( _nr : usize , _arg : usize ) -> usize {
195206 match ( ) {
You can’t perform that action at this time.
0 commit comments