Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
e29b7746
提交
e29b7746
2月 15, 2012
创建
作者:
Nickolai Zeldovich
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use std::atomic, though with operator->() for now, since that can only be…
use std::atomic, though with operator->() for now, since that can only be overriden with a member function
上级
0d38d840
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
16 行增加
和
38 行删除
+16
-38
atomic.hh
atomic.hh
+0
-14
atomic_2.h
atomic_2.h
+0
-24
atomic_std.h
atomic_std.h
+8
-0
buf.hh
buf.hh
+2
-0
crange.hh
crange.hh
+2
-0
ns.hh
ns.hh
+2
-0
vm.hh
vm.hh
+2
-0
没有找到文件。
atomic.hh
浏览文件 @
e29b7746
...
...
@@ -13,17 +13,3 @@
#define _GLIBCXX_ATOMIC_BUILTINS_8 1
#include "atomic_std.h"
template
<
class
T
>
struct
atomic
:
public
std
::
__atomic2
::
__atomic_base
<
T
>
{
atomic
()
=
default
;
~
atomic
()
=
default
;
atomic
(
const
atomic
&
)
=
delete
;
atomic
&
operator
=
(
const
atomic
&
)
=
delete
;
atomic
&
operator
=
(
const
atomic
&
)
volatile
=
delete
;
constexpr
atomic
(
T
v
)
:
std
::
__atomic2
::
__atomic_base
<
T
>
(
v
)
{}
using
std
::
__atomic2
::
__atomic_base
<
T
>::
operator
T
;
using
std
::
__atomic2
::
__atomic_base
<
T
>::
operator
=
;
};
atomic_2.h
浏览文件 @
e29b7746
...
...
@@ -464,14 +464,6 @@ namespace __atomic2
{
return
load
();
}
__pointer_type
operator
->
()
const
{
return
load
();
}
__pointer_type
operator
->
()
const
volatile
{
return
load
();
}
__pointer_type
operator
=
(
__pointer_type
__p
)
{
store
(
__p
);
...
...
@@ -650,22 +642,6 @@ namespace __atomic2
return
__p1o
==
__p1n
;
}
bool
compare_exchange_strong
(
__pointer_type
&
__p1
,
__pointer_type
__p2
,
memory_order
__m
=
memory_order_seq_cst
)
{
return
compare_exchange_strong
(
__p1
,
__p2
,
__m
,
__calculate_memory_order
(
__m
));
}
bool
compare_exchange_strong
(
__pointer_type
&
__p1
,
__pointer_type
__p2
,
memory_order
__m
=
memory_order_seq_cst
)
volatile
{
return
compare_exchange_strong
(
__p1
,
__p2
,
__m
,
__calculate_memory_order
(
__m
));
}
__pointer_type
fetch_add
(
ptrdiff_t
__d
,
memory_order
__m
=
memory_order_seq_cst
)
{
return
__sync_fetch_and_add
(
&
_M_p
,
__d
);
}
...
...
atomic_std.h
浏览文件 @
e29b7746
...
...
@@ -246,6 +246,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
return
__pointer_type
(
_M_b
);
}
__pointer_type
operator
->
()
const
{
return
__pointer_type
(
_M_b
);
}
__pointer_type
operator
->
()
const
volatile
{
return
__pointer_type
(
_M_b
);
}
__pointer_type
operator
=
(
__pointer_type
__p
)
{
return
_M_b
.
operator
=
(
__p
);
}
...
...
buf.hh
浏览文件 @
e29b7746
#include "gc.hh"
#include "atomic.hh"
using
std
::
atomic
;
struct
buf
:
public
rcu_freed
{
atomic
<
int
>
flags
;
u32
dev
;
...
...
crange.hh
浏览文件 @
e29b7746
...
...
@@ -2,6 +2,8 @@
#include "atomic.hh"
using
std
::
atomic
;
struct
crange
;
struct
range
:
public
rcu_freed
{
...
...
ns.hh
浏览文件 @
e29b7746
...
...
@@ -3,6 +3,8 @@
#include "gc.hh"
#include "atomic.hh"
using
std
::
atomic
;
// name spaces
// XXX maybe use open hash table, no chain, better cache locality
...
...
vm.hh
浏览文件 @
e29b7746
...
...
@@ -3,6 +3,8 @@
#include "gc.hh"
#include "atomic.hh"
using
std
::
atomic
;
// A mapping of a chunk of an address space to
// a specific memory object.
enum
vmatype
{
PRIVATE
,
COW
};
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论