You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/22 06:35:47 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new issue #4206: mksyscall need handle 64bit type correctly

xiaoxiang781216 opened a new issue #4206:
URL: https://github.com/apache/incubator-nuttx/issues/4206


   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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] patacongo commented on issue #4206: mksyscall need handle 64bit type correctly

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #4206:
URL: https://github.com/apache/incubator-nuttx/issues/4206#issuecomment-884916207


   On 64-bit platforms, I believe that both uintptr_t and off_t are 64-bits.  But I am not sure of that.  Need to check.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] patacongo edited a comment on issue #4206: mksyscall need handle 64bit type correctly

Posted by GitBox <gi...@apache.org>.
patacongo edited a comment on issue #4206:
URL: https://github.com/apache/incubator-nuttx/issues/4206#issuecomment-884916207


   On 64-bit platforms, I believe that both uintptr_t and off_t are 64-bits.  But I am not sure of that.  Need to check.  These combinations are OK in the current code:
   
   - uintptr_t 32-bits, off_t 32-bits
   - uintptr_t 64-bits, off_t 32-bits (we shouldn't really support this)
   - uintptr_t 64-bits, off_t 64 bits.
   
   This is not OK.
   
   - uintptr_t 32-bits, off_t 64-bits.
   
   And what about these (not currently a problem because they do not currently support syscalls):
   
   - 8-bit architectures that usually have 16-bit uintptr_t
   - eZ80 that has a 24-bit uintptr_t
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] patacongo commented on issue #4206: mksyscall need handle 64bit type correctly

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #4206:
URL: https://github.com/apache/incubator-nuttx/issues/4206#issuecomment-884923308


   I think this could be easy if:
   
   - In syscall.csv, make all APIs that use off_t depend on !defined(CONFIG_FS_LARGEFILE)
   - Add hardcoded implementations that are built only if defined(CONFIG_FS_LARGEFILE)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] patacongo edited a comment on issue #4206: mksyscall need handle 64bit type correctly

Posted by GitBox <gi...@apache.org>.
patacongo edited a comment on issue #4206:
URL: https://github.com/apache/incubator-nuttx/issues/4206#issuecomment-884923308


   I think this could be easy if:
   
   - In syscall.csv, make all APIs that use off_t depend on !defined(CONFIG_FS_LARGEFILE)
   - Add hardcoded implementations that are built only if defined(CONFIG_FS_LARGEFILE)
   
   Alternatively, automating this in mksyscall.c could be tricky.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org