message: Random: Make sys_secure_* functions extern "C"
  Note that this changes and stabilizes the API of the affected two functions.
diff: @@ -11,13 +11,14 @@ fn generate_park_miller_lehmer_random_number() -> u32 {
  random
  }
  -#[allow(improper_ctypes_definitions)]
  -extern "C" fn __sys_rand32() -> Option<u32> {
  - arch::processor::generate_random_number32()
  +extern "C" fn __sys_rand32(value: &mut u32) -> i32 {
  + *value = try_sys!(arch::processor::generate_random_number32().ok_or("sys_rand32 failed"));
  + 0
  }
  -extern "C" fn __sys_rand64(ret: &mut Option<u64>) {
  - *ret = arch::processor::generate_random_number64();
  +extern "C" fn __sys_rand64(value: &mut u64) -> i32 {
  + *value = try_sys!(arch::processor::generate_random_number64().ok_or("sys_rand64 failed"));
  + 0
  }
  extern "C" fn __sys_rand() -> u32 {
  @@ -29,8 +30,8 @@ extern "C" fn __sys_rand() -> u32 {
  /// the function returns `None`.
  #[cfg(not(feature = "newlib"))]
  #[no_mangle]
  -pub fn sys_secure_rand32() -> Option<u32> {
  - kernel_function!(__sys_rand32())
  +pub extern "C" fn sys_secure_rand32(value: &mut u32) -> i32 {
  + kernel_function!(__sys_rand32(value))
  }
  /// Create a cryptographicly secure 64bit random number with the support of
  @@ -38,10 +39,8 @@ pub fn sys_secure_rand32() -> Option<u32> {
  /// the function returns `None`.
  #[cfg(not(feature = "newlib"))]
  #[no_mangle]
  -pub fn sys_secure_rand64() -> Option<u64> {
  - let mut ret = None;
  - kernel_function!(__sys_rand64(&mut ret));
  - ret
  +pub extern "C" fn sys_secure_rand64(value: &mut u64) -> i32 {
  + kernel_function!(__sys_rand64(value))
  }
  /// The function computes a sequence of pseudo-random integers
  