Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
804dfaf0
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
804dfaf0
编写于
11月 05, 2018
作者:
M
Matthew Wilcox
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
XArray: Fix Documentation
Minor fixes. Signed-off-by:
N
Matthew Wilcox
<
willy@infradead.org
>
上级
d9c48043
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
8 deletion
+12
-8
Documentation/core-api/xarray.rst
Documentation/core-api/xarray.rst
+5
-1
include/linux/xarray.h
include/linux/xarray.h
+2
-2
lib/xarray.c
lib/xarray.c
+5
-5
未找到文件。
Documentation/core-api/xarray.rst
浏览文件 @
804dfaf0
...
...
@@ -74,7 +74,8 @@ using :c:func:`xa_load`. xa_store will overwrite any entry with the
new entry and return the previous entry stored at that index. You can
use :c:func:`xa_erase` instead of calling :c:func:`xa_store` with a
``NULL`` entry. There is no difference between an entry that has never
been stored to and one that has most recently had ``NULL`` stored to it.
been stored to, one that has been erased and one that has most recently
had ``NULL`` stored to it.
You can conditionally replace an entry at an index by using
:c:func:`xa_cmpxchg`. Like :c:func:`cmpxchg`, it will only succeed if
...
...
@@ -114,6 +115,9 @@ unused entry. If another user has stored to the entry in the meantime,
:c:func:`xa_release` will do nothing; if instead you want the entry to
become ``NULL``, you should use :c:func:`xa_erase`.
If all entries in the array are ``NULL``, the :c:func:`xa_empty` function
will return ``true``.
Finally, you can remove all entries from an XArray by calling
:c:func:`xa_destroy`. If the XArray entries are pointers, you may wish
to free the entries first. You can do this by iterating over all present
...
...
include/linux/xarray.h
浏览文件 @
804dfaf0
...
...
@@ -487,7 +487,7 @@ static inline void *xa_store_irq(struct xarray *xa, unsigned long index,
* the third argument. The XArray does not need to allocate memory, so
* the user does not need to provide GFP flags.
*
* Context:
Process
context. Takes and releases the xa_lock while
* Context:
Any
context. Takes and releases the xa_lock while
* disabling softirqs.
* Return: The entry which used to be at this index.
*/
...
...
@@ -622,7 +622,7 @@ static inline int xa_alloc(struct xarray *xa, u32 *id, u32 max, void *entry,
* Updates the @id pointer with the index, then stores the entry at that
* index. A concurrent lookup will not see an uninitialised @id.
*
* Context:
Process
context. Takes and releases the xa_lock while
* Context:
Any
context. Takes and releases the xa_lock while
* disabling softirqs. May sleep if the @gfp flags permit.
* Return: 0 on success, -ENOMEM if memory allocation fails or -ENOSPC if
* there is no more space in the XArray.
...
...
lib/xarray.c
浏览文件 @
804dfaf0
...
...
@@ -610,8 +610,8 @@ static int xas_expand(struct xa_state *xas, void *head)
* (see the xa_cmpxchg() implementation for an example).
*
* Return: If the slot already existed, returns the contents of this slot.
* If the slot was newly created, returns NULL. If it failed to create the
* slot, returns NULL and indicates the error in @xas.
* If the slot was newly created, returns
%
NULL. If it failed to create the
* slot, returns
%
NULL and indicates the error in @xas.
*/
static
void
*
xas_create
(
struct
xa_state
*
xas
)
{
...
...
@@ -1640,7 +1640,7 @@ EXPORT_SYMBOL(__xa_alloc);
* @index: Index of entry.
* @mark: Mark number.
*
* Attempting to set a mark on a NULL entry does not succeed.
* Attempting to set a mark on a
%
NULL entry does not succeed.
*
* Context: Any context. Expects xa_lock to be held on entry.
*/
...
...
@@ -1710,7 +1710,7 @@ EXPORT_SYMBOL(xa_get_mark);
* @index: Index of entry.
* @mark: Mark number.
*
* Attempting to set a mark on a NULL entry does not succeed.
* Attempting to set a mark on a
%
NULL entry does not succeed.
*
* Context: Process context. Takes and releases the xa_lock.
*/
...
...
@@ -1879,7 +1879,7 @@ static unsigned int xas_extract_marked(struct xa_state *xas, void **dst,
*
* The @filter may be an XArray mark value, in which case entries which are
* marked with that mark will be copied. It may also be %XA_PRESENT, in
* which case all entries which are not NULL will be copied.
* which case all entries which are not
%
NULL will be copied.
*
* The entries returned may not represent a snapshot of the XArray at a
* moment in time. For example, if another thread stores to index 5, then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录