@@ -108,7 +108,7 @@ pub(crate) fn clock_gettime_dynamic(which_clock: DynamicClockId<'_>) -> io::Resu
108108 match callee ( id, timespec. as_mut_ptr ( ) ) {
109109 0 => ( ) ,
110110 EINVAL => return Err ( io:: Errno :: INVAL ) ,
111- _ => _rustix_clock_gettime_via_syscall ( id, timespec. as_mut_ptr ( ) ) ?,
111+ _ => _clock_gettime_via_syscall ( id, timespec. as_mut_ptr ( ) ) ?,
112112 }
113113 Ok ( timespec. assume_init ( ) )
114114 }
@@ -337,35 +337,26 @@ static GETCPU: AtomicPtr<Function> = AtomicPtr::new(null_mut());
337337static SYSCALL : AtomicPtr < Function > = AtomicPtr :: new ( null_mut ( ) ) ;
338338
339339#[ cfg( feature = "time" ) ]
340- unsafe extern "C" fn rustix_clock_gettime_via_syscall (
341- clockid : c:: c_int ,
342- res : * mut Timespec ,
343- ) -> c:: c_int {
344- match _rustix_clock_gettime_via_syscall ( clockid, res) {
340+ unsafe extern "C" fn clock_gettime_via_syscall ( clockid : c:: c_int , res : * mut Timespec ) -> c:: c_int {
341+ match _clock_gettime_via_syscall ( clockid, res) {
345342 Ok ( ( ) ) => 0 ,
346343 Err ( err) => err. raw_os_error ( ) . wrapping_neg ( ) ,
347344 }
348345}
349346
350347#[ cfg( feature = "time" ) ]
351348#[ cfg( target_pointer_width = "32" ) ]
352- unsafe fn _rustix_clock_gettime_via_syscall (
353- clockid : c:: c_int ,
354- res : * mut Timespec ,
355- ) -> io:: Result < ( ) > {
349+ unsafe fn _clock_gettime_via_syscall ( clockid : c:: c_int , res : * mut Timespec ) -> io:: Result < ( ) > {
356350 let r0 = syscall ! ( __NR_clock_gettime64, c_int( clockid) , res) ;
357351 match ret ( r0) {
358- Err ( io:: Errno :: NOSYS ) => _rustix_clock_gettime_via_syscall_old ( clockid, res) ,
352+ Err ( io:: Errno :: NOSYS ) => _clock_gettime_via_syscall_old ( clockid, res) ,
359353 otherwise => otherwise,
360354 }
361355}
362356
363357#[ cfg( feature = "time" ) ]
364358#[ cfg( target_pointer_width = "32" ) ]
365- unsafe fn _rustix_clock_gettime_via_syscall_old (
366- clockid : c:: c_int ,
367- res : * mut Timespec ,
368- ) -> io:: Result < ( ) > {
359+ unsafe fn _clock_gettime_via_syscall_old ( clockid : c:: c_int , res : * mut Timespec ) -> io:: Result < ( ) > {
369360 // Ordinarily `rustix` doesn't like to emulate system calls, but in the
370361 // case of time APIs, it's specific to Linux, specific to 32-bit
371362 // architectures *and* specific to old kernel versions, and it's not that
@@ -387,10 +378,7 @@ unsafe fn _rustix_clock_gettime_via_syscall_old(
387378
388379#[ cfg( feature = "time" ) ]
389380#[ cfg( target_pointer_width = "64" ) ]
390- unsafe fn _rustix_clock_gettime_via_syscall (
391- clockid : c:: c_int ,
392- res : * mut Timespec ,
393- ) -> io:: Result < ( ) > {
381+ unsafe fn _clock_gettime_via_syscall ( clockid : c:: c_int , res : * mut Timespec ) -> io:: Result < ( ) > {
394382 ret ( syscall ! ( __NR_clock_gettime, c_int( clockid) , res) )
395383}
396384
@@ -402,7 +390,7 @@ unsafe fn _rustix_clock_gettime_via_syscall(
402390 target_arch = "powerpc64" ,
403391 target_arch = "s390x" ,
404392) ) ]
405- unsafe extern "C" fn rustix_getcpu_via_syscall (
393+ unsafe extern "C" fn getcpu_via_syscall (
406394 cpu : * mut u32 ,
407395 node : * mut u32 ,
408396 unused : * mut c_void ,
@@ -451,7 +439,7 @@ fn minimal_init() {
451439 CLOCK_GETTIME
452440 . compare_exchange (
453441 null_mut ( ) ,
454- rustix_clock_gettime_via_syscall as * mut Function ,
442+ clock_gettime_via_syscall as * mut Function ,
455443 Relaxed ,
456444 Relaxed ,
457445 )
@@ -470,7 +458,7 @@ fn minimal_init() {
470458 GETCPU
471459 . compare_exchange (
472460 null_mut ( ) ,
473- rustix_getcpu_via_syscall as * mut Function ,
461+ getcpu_via_syscall as * mut Function ,
474462 Relaxed ,
475463 Relaxed ,
476464 )
0 commit comments