oscomp / oscomp/testsuits-for-oskernel

TimeSpec的第二个数据成员是纳秒还是微秒?

Open
#40 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
159
Forks
60
PR merge metrics
No merged PRs in 30d

Description

你好,请问TimeSpec的第二个数据成员是纳秒还是微秒?

在basic的文档中,TimeSpec的第二个数据成员是纳秒(如下图)
Image

而在basic/user/lib/syscall.c中,传入的参数类型是TimeVal*,它的第二个数据成员是微秒(如下图)
Image

在系统调用时,虽然传入的参数类型是TimeVal*,但在内核中会转换为TimeSpec*类型,但二者的第二个数据成员的内涵不同,会导致最后计算出来的结果不同。

因此,想知道TimeSpec的第二个数据成员是纳秒还是微秒?

感谢你的回答!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the TimeSpec description in the basic documentation with the TimeVal usage in basic/user/lib/syscall.c, then trace the kernel conversion mentioned in the issue. Confirm which unit the second member uses and update the relevant documentation or explanation so the documented and implemented behavior agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation, operating-systems
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.