Fix semantics of posix time function#240
Fix semantics of posix time function#240zhanghe-vivo wants to merge 1 commit intovivoblueos:mainfrom
Conversation
|
Can you elaborate why do we need to invent a new POSIX timer in kernel rather than using soft timer? |
2cb31b7 to
c96c29f
Compare
|
stub posix timers, preserve clock implement |
c96c29f to
b08053d
Compare
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20710231867. |
|
❌ Job failed. Failed jobs: check_format (failure), build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/20710231867. |
b08053d to
70cef89
Compare
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20710672760. |
|
❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/20710672760. |
70cef89 to
4599868
Compare
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20710835888. |
|
❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/20710835888. |
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20711463695. |
|
❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/20711463695. |
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20711707723. |
|
❌ Job failed. Failed jobs: build_and_check_boards (failure), see https://github.com/vivoblueos/kernel/actions/runs/20711707723. |
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20712177870. |
|
✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/20712177870. |
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20712502352. |
|
✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/20712502352. |
| @@ -0,0 +1,333 @@ | |||
| // Copyright (c) 2025 vivo Mobile Communication Co., Ltd. | |||
There was a problem hiding this comment.
| // Copyright (c) 2025 vivo Mobile Communication Co., Ltd. | |
| // Copyright (c) 2026 vivo Mobile Communication Co., Ltd. |
There was a problem hiding this comment.
change as suggest
| use crate::sync::spinlock::SpinLock; | ||
| static REALTIME_OFFSET_NS: SpinLock<i64> = SpinLock::new(0); | ||
|
|
||
| fn clear_itimerspec(dest: *mut itimerspec) { |
There was a problem hiding this comment.
Please avoid using raw pointers when using pure Rust is possible.
There was a problem hiding this comment.
it's just for stub, removed them now
|
|
||
| fn thread_cpu_cycles(thread: &Thread) -> u64 { | ||
| let mut total = thread.get_cycles(); | ||
| if thread.state() == thread::RUNNING { |
There was a problem hiding this comment.
Why do we need this check?
There was a problem hiding this comment.
yes, it's redundancy, should direct use compensatory
4599868 to
5b09a06
Compare
|
build_prs #240 vivoblueos/librs#22 vivoblueos/libc#5 |
|
Job is started, see https://github.com/vivoblueos/kernel/actions/runs/20777716627. |
|
✅ All jobs completed successfully, see https://github.com/vivoblueos/kernel/actions/runs/20777716627. |
signal process hasn't added, will rebase #238