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;
184
184
pub mod nr;
185
185
186
186
/// 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
187
194
#[ inline( always) ]
188
195
pub unsafe fn syscall < T > ( nr : usize , arg : & T ) -> usize {
189
196
syscall1 ( nr, arg as * const T as usize )
190
197
}
191
198
192
199
/// Performs a semihosting operation, takes one integer as an argument
200
+ ///
201
+ /// # Safety
202
+ ///
203
+ /// Same as [`syscall`].
193
204
#[ inline( always) ]
194
205
pub unsafe fn syscall1 ( _nr : usize , _arg : usize ) -> usize {
195
206
match ( ) {
You can’t perform that action at this time.
0 commit comments