Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TODO] 解决RT_Exxx错误代码以及POSIX错误代码正负乱用的问题 #4791

Closed
mysterywolf opened this issue Jun 12, 2021 · 6 comments

Comments

@mysterywolf
Copy link
Member

No description provided.

@mysterywolf mysterywolf added bug This PR/issue is a bug in the current code. proposal proposal for future version labels Jun 12, 2021
@Guozhanxin
Copy link
Member

这个问题其实不止是正负乱用,有些组件错误码本身也没有区分清楚。

@mysterywolf
Copy link
Member Author

#2002

@mysterywolf
Copy link
Member Author

建议我们这边得做出硬性规定,用RTT自己的错误代码用负数表示,Linux/posix错误代码跟随linux用正数

@mysterywolf
Copy link
Member Author

@Guozhanxin
Copy link
Member

Guozhanxin commented Jun 18, 2021

RT ERROR 描述 posix
00 RT_EOK no error 0
01 RT_ERROR generic error
02 RT_ETIMEOUT Timed out ETIMEDOUT 60
03 RT_EFULL The resource is full ENOSPC 28 /* No space left on device */
04 RT_EEMPTY The resource is empty ENODATA 61 /* No data (for no delay io) */
05 RT_ENOMEM No memory ENOMEM 12
06 RT_ENOSYS No system ENOSYS 88
07 RT_EBUSY Busy EBUSY 16
08 RT_EIO IO error EIO 5
09 RT_EINTR Interrupted system call EINTR 4
10 RT_EINVAL Invalid argument EINVAL 22

@Guozhanxin
Copy link
Member

需要注意文件抽象层 dfs 和网络抽象层 sal 的存在,会不会对 posix error 的返回造成影响。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants