Skip to content

Commit

Permalink
Merge branch 'userbuffer-dev' of https://github.com/Chiichen/DragonOS
Browse files Browse the repository at this point in the history
…into userbuffer-dev
  • Loading branch information
Chiichen committed Aug 17, 2023
2 parents 7839046 + 2328c8a commit 9946df2
Show file tree
Hide file tree
Showing 24 changed files with 887 additions and 251 deletions.
556 changes: 556 additions & 0 deletions docs/community/ChangeLog/V0.1.x/V0.1.8.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/community/ChangeLog/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.. toctree::
:maxdepth: 1

V0.1.x/V0.1.8
V0.1.x/V0.1.7
V0.1.x/V0.1.6
V0.1.x/V0.1.5
Expand Down
4 changes: 2 additions & 2 deletions docs/community/contact/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

社区公共邮箱:[email protected]

DragonOS社区负责人: longjin
DragonOS社区负责人: 龙进

工作邮箱: [email protected]

Expand All @@ -27,7 +27,7 @@ DragonOS是一个开源项目,我们欢迎任何形式的赞助和捐赠,您
您可以通过以下方式赞助和捐赠:

- 访问DragonOS官网 https://DragonOS.org ,点击页面右上角的“赞助”按钮,进行捐赠
- 联系社区负责人,沟通具体的赞助方式等。
- 联系社区负责人,沟通具体的赞助方式等。联系方式:[email protected]

财务及捐赠信息公开
-------------------------
Expand Down
4 changes: 3 additions & 1 deletion docs/introduction/build_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ cd DragonOS
```

:::{warning}
DragonOS的源代码托管在Github上,但是,由于Github在国内的访问速度较慢,因此,我们建议您在github上绑定您的电脑的**ssh公钥**
DragonOS的源代码托管在Github上,但是,由于Github在国内的访问速度较慢。可能出现克隆失败的情况,这时只要重试即可。

当然,我们建议您在github上绑定您的电脑的**ssh公钥**
然后通过以下命令来克隆代码,防止频繁出现git clone、pull、push失败的情况。

```shell
Expand Down
2 changes: 2 additions & 0 deletions docs/introduction/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
- [x] 屏幕管理器
- [x] textui框架
- [x] CRC函数库
- [x] 通知链

### 系统调用

Expand Down Expand Up @@ -144,3 +145,4 @@
- [x] mpfr 4.1.1 [https://github.com/DragonOS-Community/mpfr](https://github.com/DragonOS-Community/mpfr)
- [x] mpc 1.2.1 [https://github.com/DragonOS-Community/mpc](https://github.com/DragonOS-Community/mpc)
- [x] relibc [https://github.com/DragonOS-Community/relibc](https://github.com/DragonOS-Community/relibc)
- [x] sqlite3
3 changes: 2 additions & 1 deletion docs/introduction/mirrors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

您可以从以下镜像站下载到DragonOS的源代码和其他文件:

- [DragonOS镜像站](https://mirrors.dragonos.org/)
- [DragonOS镜像站 https://mirrors.dragonos.org/](https://mirrors.dragonos.org/)
- [DragonOS国内镜像站 (RinGoTek)](https://mirrors.RinGoTek.cn)
- [git镜像站](https://git.mirrors.dragonos.org/)
7 changes: 4 additions & 3 deletions kernel/src/arch/x86_64/cpu.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use core::arch::asm;

use super::asm::current::current_pcb;
use x86::cpuid::{cpuid, CpuIdResult};

/// @brief 获取当前cpu的apic id
#[inline]
pub fn current_cpu_id() -> u32 {
// TODO: apic重构后,使用apic id来设置这里
current_pcb().cpu_id as u32
let cpuid_res: CpuIdResult = cpuid!(0x1);
let cpu_id = (cpuid_res.ebx >> 24) & 0xff;
return cpu_id;
}

/// @brief 通过pause指令,让cpu休息一会儿。降低空转功耗
Expand Down
8 changes: 0 additions & 8 deletions kernel/src/common/gfp.h

This file was deleted.

38 changes: 0 additions & 38 deletions kernel/src/common/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,6 @@
// 操作系统定义时间以ns为单位
#define CLOCKS_PER_SEC 1000000

struct tm
{
int tm_sec; /* Seconds. [0-60] (1 leap second) */
int tm_min; /* Minutes. [0-59] */
int tm_hour; /* Hours. [0-23] */
int tm_mday; /* Day. [1-31] */
int tm_mon; /* Month. [0-11] */
int tm_year; /* Year - 1900. */
int tm_wday; /* Day of week. [0-6] */
int tm_yday; /* Days in year.[0-365] */
int tm_isdst; /* DST. [-1/0/1]*/

long int __tm_gmtoff; /* Seconds east of UTC. */
const char *__tm_zone; /* Timezone abbreviation. */
};

struct timespec
{
int64_t tv_sec; // 秒
int64_t tv_nsec; // 纳秒
};

/**
* @brief 休眠指定时间
*
* @param rqtp 指定休眠的时间
* @param rmtp 返回的剩余休眠时间
* @return int
*/
extern int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);

/**
* @brief 睡眠指定时间
*
* @param usec 微秒
* @return int
*/
extern int usleep(useconds_t usec);

/**
* @brief 获取当前的CPU时间
Expand Down
1 change: 0 additions & 1 deletion kernel/src/filesystem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ pub mod fat;
pub mod mbr;
pub mod procfs;
pub mod ramfs;
pub mod syscall;
pub mod sysfs;
pub mod vfs;
167 changes: 0 additions & 167 deletions kernel/src/filesystem/syscall.rs

This file was deleted.

2 changes: 1 addition & 1 deletion kernel/src/filesystem/vfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub trait IndexNode: Any + Sync + Send + Debug {
}

/// @brief 重新设置文件的大小
///
///
/// 如果文件大小增加,则文件内容不变,但是文件的空洞部分会被填充为0
/// 如果文件大小减小,则文件内容会被截断
///
Expand Down
Loading

0 comments on commit 9946df2

Please sign in to comment.