apache / apache/nuttx

mksyscall need handle 64bit type correctly

Open
#4,206 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

up_syscallx supported by arch can only handle the native integer(uintptr_t) correctly. Since uintptr_t on 32bit arch is 32bit, but functions listed below need pass or return 64bit value:

1. clock_t clock(void) when CONFIG_SYSTEM_TIME64==y
2. off_t lseek(int fd, off_t offset, int whence) when CONFIG_FS_LARGEFILE==y

mksyscall need modify in this case by:

1. Proxy split 64bit to two 32bit before invoke sys_call
2. Sub merge two 32bit to 64bit before invoke the real function

See the dissussion here: https://github.com/apache/incubator-nuttx/issues/4206

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.