-
-
Notifications
You must be signed in to change notification settings - Fork 158
实现gettimeofday()系统调用和clocksource+timekeeping子模块 #278
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
f21d90b
支持时间子系统
houmkh 90235c1
解决报错问题
fslongjin 76c4043
timekeeping+clocksource,待测试
houmkh dfdaa92
整理time文件夹
houmkh 69c68e8
整理clocksource jiffies
houmkh cdbcdc9
修改time模块
houmkh 8178217
Merge branch 'master' of github.com:DragonOS-Community/DragonOS into …
houmkh f924465
实现timeconv,clocksource+timekeeping板块测试完成
houmkh a0a78aa
测试gettimeofday
houmkh 753b175
Merge branch 'master' of github.com:DragonOS-Community/DragonOS into …
houmkh b237645
修改系统调用+修改update wall time
houmkh 12a2d1e
把一些变量改为Atomic的,并且把裸指针改为Option
fslongjin 124beae
解决update wall time报错问题。原因:local_irq_save和local_irq_restore汇编代码不规范
fslongjin 7bb25b7
debug timekeeping
houmkh 520a93a
清理kdebug
houmkh e8f0c5e
Merge branch 'master' of github.com:DragonOS-Community/DragonOS into …
houmkh 2a47e68
test gettimeofday
houmkh 3f5f18f
Merge branch 'master' of github.com:DragonOS-Community/DragonOS into …
houmkh 0024bd9
暂时注释process_exit_mm()
houmkh 5cec1df
修改dadk
houmkh 2f7e9e9
解决了几个warning
fslongjin 08d0cc0
修复一些小问题
fslongjin 987f295
清理代码
houmkh 03583ae
Merge branch 'posix-timer' of github.com:houmkh/DragonOS into posix-t…
houmkh 8598483
为一些结构体加上了Debug trait
fslongjin 7552345
增加工作队列todo
houmkh 77327bb
Merge branch 'posix-timer' of github.com:houmkh/DragonOS into posix-t…
houmkh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
use core::{arch::asm, ptr::read_volatile}; | ||
use core::arch::asm; | ||
|
||
#[inline] | ||
pub fn local_irq_save(flags: &mut u64) { | ||
pub fn local_irq_save() -> usize { | ||
let x: usize; | ||
unsafe { | ||
asm!("pushfq", "pop rax", "mov rax, {0}", "cli", out(reg)(*flags),); | ||
asm!("pushfq ; pop {} ; cli", out(reg) x, options(nostack)); | ||
} | ||
x | ||
} | ||
|
||
#[inline] | ||
pub fn local_irq_restore(flags: &u64) { | ||
let x = unsafe { read_volatile(flags) }; | ||
|
||
// 恢复先前保存的rflags的值x | ||
pub fn local_irq_restore(x: usize) { | ||
unsafe { | ||
asm!("push r15", | ||
"popfq", in("r15")(x)); | ||
asm!("push {} ; popfq", in(reg) x, options(nostack)); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.