nuttx/fs/vfs
Xiang Xiao c47b1e2c5b !sys/types.h: change time_t and clock_t to int64_t to align with other OSes
POSIX leaves the signedness of time_t and clock_t unspecified, but
mainstream implementations (Linux glibc/musl, the BSDs, macOS, RTEMS,
Zephyr's POSIX layer, Windows _time64) expose time_t as signed 64-bit.
NuttX has historically used uint64_t only because it was tied to the
CONFIG_SYSTEM_TIME64 knob; with that gone, switch:

  time_t   : uint64_t  -> int64_t
  clock_t  : uint64_t  -> int64_t
  CLOCK_MAX: UINT64_MAX -> INT64_MAX

This lets (time_t)-1 sentinels, negative tick deltas, and host-side
headers behave as on every other POSIX system without source churn.

Headers updated:
  - include/sys/types.h, include/limits.h, include/nuttx/clock.h
  - include/nuttx/fs/hostfs.h (nuttx_time_t alias)
  - include/nuttx/{mqueue.h,wdog.h,wqueue.h,timers/clkcnt.h}

Because clock_t is now signed 64-bit, the NuttX-internal sclock_t
alias becomes redundant: every sclock_t/SCLOCK_MAX use is folded
back to clock_t/CLOCK_MAX (notably in sched/wdog, sched/mqueue,
sched/sched, sched/clock, sched/timer, libs/libc/time, fs/vfs and
the drivers/arch consumers below).

Tick/period constants (NSEC_PER_SEC, USEC_PER_SEC, MSEC_PER_SEC,
SEC_PER_MIN, ...) in include/nuttx/clock.h are retyped from "long"
literals to INT64_C(...) so that 64-bit arithmetic no longer
depends on the host's long width.

Strip now-redundant (time_t)/(clock_t)/(unsigned long) casts and
unsigned-only branches across the tree:
  - arch RTC / oneshot / tickless lowerhalfs:
      arm: cxd56xx, efm32, imxrt, lc823450, max326xx, sam34, sama5,
           samd5e5, samv7, stm32, stm32f7, stm32h7, stm32l4, stm32wb,
           xmc4
      mips: pic32mz       sparc: bm3803       x86_64: intel64
      risc-v/xtensa: espressif (esp_i2c[_slave], esp_rtc,
           esp32c3{_i2c,_rtc,_wifi_adapter}, esp32{,s2,s3}_*),
           mpfs_perf
  - drivers: audio/tone, input/aw86225, power/pm/{activity,
           stability}_governor, rpmsg/rpmsg_ping,
           timers/{ds3231,mcp794xx,pcf85263,rx8010},
           wireless/ieee80211/bcm43xxx, wireless/spirit/spirit_spi
  - core: fs/vfs/{fs_poll,fs_timerfd}, mm/iob/iob_alloc,
          libs/libc/{netdb/lib_dnscache,time/{lib_calendar2utc,
          lib_time}}, net/icmp/icmp_pmtu, net/icmpv6/icmpv6_pmtu,
          net/ipfrag, net/tcp/{tcp.h,tcp_timer},
          net/utils/net_snoop, net/mld/mld_query (drop the now-dead
          mld_mrc2mrd helper since signed math handles it directly),
          sched/clock/{clock,clock_initialize},
          sched/sched/{sched_profil,sched_setparam,sched_setscheduler},
          sched/pthread/pthread_create,
          sched/wdog/{wd_gettime,wd_start,wdog.h},
          sched/timer/timer_gettime, sched/mqueue/*

Flip the few in-tree printf format strings that assumed an
unsigned 64-bit tv_sec:
  * drivers/rpmsg/rpmsg_ping.c                       PRIu64 -> PRId64
  * arch/xtensa/src/esp32{,s2,s3}/esp32*_oneshot_lowerhalf.c
                                          PRIu32 (already wrong) -> PRId64

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
..
CMakeLists.txt fs: Add Kernel-level VFS Performance Profiler 2026-04-26 11:50:09 -03:00
fs_chstat.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_close.c fs: Add Kernel-level VFS Performance Profiler 2026-04-26 11:50:09 -03:00
fs_dir.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
fs_dup.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_dup2.c fs/vfs: fix bug about lost dup oflags in dup2 2025-07-15 19:46:24 +08:00
fs_dup3.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_epoll.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
fs_eventfd.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
fs_fchstat.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_fcntl.c fs/fcntl: using ioctl to implement FIOGCLEX/FIOCLEX/FIONCLEX 2025-06-15 07:12:44 -03:00
fs_fstat.c fs/vfs/fs_fstat.c: fix write capability check in proxy_fstat() 2026-04-16 13:35:41 +02:00
fs_fstatfs.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_fsync.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_inotify.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
fs_ioctl.c fs/vfs: Rename lock.h to vfs.h 2025-06-23 18:17:10 -03:00
fs_link.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_lock.c fs/vfs/fs_lock.c: Close stale locks unconditionally 2026-04-28 11:51:35 +08:00
fs_lseek.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_mkdir.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_open.c fs/vfs: enforce pseudoFS permissions on open() 2026-05-17 15:48:29 -03:00
fs_poll.c !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
fs_pread.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_profile.c fs: Add Kernel-level VFS Performance Profiler 2026-04-26 11:50:09 -03:00
fs_pseudofile.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_pwrite.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_read.c fs/vfs: allow NULL iov_base in KERNEL build with zero-based text 2026-05-06 01:37:53 +08:00
fs_readlink.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_rename.c fs/vfs/fs_rename: fix directory move operation. 2025-07-31 01:53:59 +08:00
fs_rmdir.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_select.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
fs_sendfile.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
fs_signalfd.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
fs_stat.c fs/vfs: fix pseudoFS mode reporting 2026-05-14 02:43:41 -04:00
fs_statfs.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_symlink.c fs/vfs/symlink: fix the inode information update outside of lock 2026-01-28 10:03:06 +08:00
fs_syncfs.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_timerfd.c !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
fs_truncate.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
fs_uio.c fs/uio: do not overwrite the return value 2025-01-22 16:45:46 +08:00
fs_unlink.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_write.c fs: Add Kernel-level VFS Performance Profiler 2026-04-26 11:50:09 -03:00
Kconfig fs/inode: add optional manual FD backtrace control via task group flag 2026-04-28 09:53:27 +02:00
Make.defs fs: Add Kernel-level VFS Performance Profiler 2026-04-26 11:50:09 -03:00
vfs.h fs: Add Kernel-level VFS Performance Profiler 2026-04-26 11:50:09 -03:00