-
Notifications
You must be signed in to change notification settings - Fork 80
Fix semantics of posix time function #240
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
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Copyright (c) 2025 vivo Mobile Communication Co., Ltd. | |
| // Copyright (c) 2026 vivo Mobile Communication Co., Ltd. |
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid using raw pointers when using pure Rust is possible.
|
|
||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this check?
signal process hasn't added, will rebase #238