Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
bc8d422d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bc8d422d
编写于
6月 14, 2009
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: Convert to asm-generic/posix_types.h.
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
9deaa3bc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
214 deletion
+32
-214
arch/sh/include/asm/posix_types_32.h
arch/sh/include/asm/posix_types_32.h
+15
-104
arch/sh/include/asm/posix_types_64.h
arch/sh/include/asm/posix_types_64.h
+17
-110
未找到文件。
arch/sh/include/asm/posix_types_32.h
浏览文件 @
bc8d422d
#ifndef __ASM_SH_POSIX_TYPES_H
#ifndef __ASM_SH_POSIX_TYPES_
32_
H
#define __ASM_SH_POSIX_TYPES_H
#define __ASM_SH_POSIX_TYPES_
32_
H
/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
* assume GCC is being used.
*/
typedef
unsigned
long
__kernel_ino_t
;
typedef
unsigned
short
__kernel_mode_t
;
typedef
unsigned
short
__kernel_mode_t
;
#define __kernel_mode_t __kernel_mode_t
typedef
unsigned
short
__kernel_nlink_t
;
typedef
unsigned
short
__kernel_nlink_t
;
typedef
long
__kernel_off_t
;
#define __kernel_nlink_t __kernel_nlink_t
typedef
int
__kernel_pid_t
;
typedef
unsigned
short
__kernel_ipc_pid_t
;
typedef
unsigned
short
__kernel_ipc_pid_t
;
#define __kernel_ipc_pid_t __kernel_ipc_pid_t
typedef
unsigned
short
__kernel_uid_t
;
typedef
unsigned
short
__kernel_uid_t
;
#define __kernel_uid_t __kernel_uid_t
typedef
unsigned
short
__kernel_gid_t
;
typedef
unsigned
short
__kernel_gid_t
;
typedef
unsigned
int
__kernel_size_t
;
#define __kernel_gid_t __kernel_gid_t
typedef
int
__kernel_ssize_t
;
typedef
int
__kernel_ptrdiff_t
;
typedef
long
__kernel_time_t
;
typedef
long
__kernel_suseconds_t
;
typedef
long
__kernel_clock_t
;
typedef
int
__kernel_timer_t
;
typedef
int
__kernel_clockid_t
;
typedef
int
__kernel_daddr_t
;
typedef
char
*
__kernel_caddr_t
;
typedef
unsigned
short
__kernel_uid16_t
;
typedef
unsigned
short
__kernel_gid16_t
;
typedef
unsigned
int
__kernel_uid32_t
;
typedef
unsigned
int
__kernel_uid32_t
;
#define __kernel_uid32_t __kernel_uid32_t
typedef
unsigned
int
__kernel_gid32_t
;
typedef
unsigned
int
__kernel_gid32_t
;
#define __kernel_gid32_t __kernel_gid32_t
typedef
unsigned
short
__kernel_old_uid_t
;
typedef
unsigned
short
__kernel_old_uid_t
;
#define __kernel_old_uid_t __kernel_old_uid_t
typedef
unsigned
short
__kernel_old_gid_t
;
typedef
unsigned
short
__kernel_old_gid_t
;
#define __kernel_old_gid_t __kernel_old_gid_t
typedef
unsigned
short
__kernel_old_dev_t
;
typedef
unsigned
short
__kernel_old_dev_t
;
#define __kernel_old_dev_t __kernel_old_dev_t
#ifdef __GNUC__
#include <asm-generic/posix_types.h>
typedef
long
long
__kernel_loff_t
;
#endif
typedef
struct
{
int
val
[
2
];
}
__kernel_fsid_t
;
#if defined(__KERNEL__)
#undef __FD_SET
static
__inline__
void
__FD_SET
(
unsigned
long
__fd
,
__kernel_fd_set
*
__fdsetp
)
{
unsigned
long
__tmp
=
__fd
/
__NFDBITS
;
unsigned
long
__rem
=
__fd
%
__NFDBITS
;
__fdsetp
->
fds_bits
[
__tmp
]
|=
(
1UL
<<
__rem
);
}
#undef __FD_CLR
static
__inline__
void
__FD_CLR
(
unsigned
long
__fd
,
__kernel_fd_set
*
__fdsetp
)
{
unsigned
long
__tmp
=
__fd
/
__NFDBITS
;
unsigned
long
__rem
=
__fd
%
__NFDBITS
;
__fdsetp
->
fds_bits
[
__tmp
]
&=
~
(
1UL
<<
__rem
);
}
#undef __FD_ISSET
static
__inline__
int
__FD_ISSET
(
unsigned
long
__fd
,
const
__kernel_fd_set
*
__p
)
{
unsigned
long
__tmp
=
__fd
/
__NFDBITS
;
unsigned
long
__rem
=
__fd
%
__NFDBITS
;
return
(
__p
->
fds_bits
[
__tmp
]
&
(
1UL
<<
__rem
))
!=
0
;
}
/*
* This will unroll the loop for the normal constant case (8 ints,
* for a 256-bit fd_set)
*/
#undef __FD_ZERO
static
__inline__
void
__FD_ZERO
(
__kernel_fd_set
*
__p
)
{
unsigned
long
*
__tmp
=
__p
->
fds_bits
;
int
__i
;
if
(
__builtin_constant_p
(
__FDSET_LONGS
))
{
switch
(
__FDSET_LONGS
)
{
case
16
:
__tmp
[
0
]
=
0
;
__tmp
[
1
]
=
0
;
__tmp
[
2
]
=
0
;
__tmp
[
3
]
=
0
;
__tmp
[
4
]
=
0
;
__tmp
[
5
]
=
0
;
__tmp
[
6
]
=
0
;
__tmp
[
7
]
=
0
;
__tmp
[
8
]
=
0
;
__tmp
[
9
]
=
0
;
__tmp
[
10
]
=
0
;
__tmp
[
11
]
=
0
;
__tmp
[
12
]
=
0
;
__tmp
[
13
]
=
0
;
__tmp
[
14
]
=
0
;
__tmp
[
15
]
=
0
;
return
;
case
8
:
__tmp
[
0
]
=
0
;
__tmp
[
1
]
=
0
;
__tmp
[
2
]
=
0
;
__tmp
[
3
]
=
0
;
__tmp
[
4
]
=
0
;
__tmp
[
5
]
=
0
;
__tmp
[
6
]
=
0
;
__tmp
[
7
]
=
0
;
return
;
case
4
:
__tmp
[
0
]
=
0
;
__tmp
[
1
]
=
0
;
__tmp
[
2
]
=
0
;
__tmp
[
3
]
=
0
;
return
;
}
}
__i
=
__FDSET_LONGS
;
while
(
__i
)
{
__i
--
;
*
__tmp
=
0
;
__tmp
++
;
}
}
#endif
/* defined(__KERNEL__) */
#endif
/* __ASM_SH_POSIX_TYPES_H */
#endif
/* __ASM_SH_POSIX_TYPES_
32_
H */
arch/sh/include/asm/posix_types_64.h
浏览文件 @
bc8d422d
#ifndef __ASM_SH
64_POSIX_TYPES
_H
#ifndef __ASM_SH
_POSIX_TYPES_64
_H
#define __ASM_SH
64_POSIX_TYPES
_H
#define __ASM_SH
_POSIX_TYPES_64
_H
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* include/asm-sh64/posix_types.h
*
* Copyright (C) 2000, 2001 Paolo Alberelli
* Copyright (C) 2003 Paul Mundt
*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
* assume GCC is being used.
*/
typedef
unsigned
long
__kernel_ino_t
;
typedef
unsigned
short
__kernel_mode_t
;
typedef
unsigned
short
__kernel_mode_t
;
#define __kernel_mode_t __kernel_mode_t
typedef
unsigned
short
__kernel_nlink_t
;
typedef
unsigned
short
__kernel_nlink_t
;
typedef
long
__kernel_off_t
;
#define __kernel_nlink_t __kernel_nlink_t
typedef
int
__kernel_pid_t
;
typedef
unsigned
short
__kernel_ipc_pid_t
;
typedef
unsigned
short
__kernel_ipc_pid_t
;
#define __kernel_ipc_pid_t __kernel_ipc_pid_t
typedef
unsigned
short
__kernel_uid_t
;
typedef
unsigned
short
__kernel_uid_t
;
#define __kernel_uid_t __kernel_uid_t
typedef
unsigned
short
__kernel_gid_t
;
typedef
unsigned
short
__kernel_gid_t
;
#define __kernel_gid_t __kernel_gid_t
typedef
long
unsigned
int
__kernel_size_t
;
typedef
long
unsigned
int
__kernel_size_t
;
#define __kernel_size_t __kernel_size_t
typedef
int
__kernel_ssize_t
;
typedef
int
__kernel_ssize_t
;
#define __kernel_ssize_t __kernel_ssize_t
typedef
int
__kernel_ptrdiff_t
;
typedef
int
__kernel_ptrdiff_t
;
typedef
long
__kernel_time_t
;
#define __kernel_ptrdiff_t __kernel_ptrdiff_t
typedef
long
__kernel_suseconds_t
;
typedef
long
__kernel_clock_t
;
typedef
int
__kernel_timer_t
;
typedef
int
__kernel_clockid_t
;
typedef
int
__kernel_daddr_t
;
typedef
char
*
__kernel_caddr_t
;
typedef
unsigned
short
__kernel_uid16_t
;
typedef
unsigned
short
__kernel_gid16_t
;
typedef
unsigned
int
__kernel_uid32_t
;
typedef
unsigned
int
__kernel_uid32_t
;
#define __kernel_uid32_t __kernel_uid32_t
typedef
unsigned
int
__kernel_gid32_t
;
typedef
unsigned
int
__kernel_gid32_t
;
#define __kernel_gid32_t __kernel_gid32_t
typedef
unsigned
short
__kernel_old_uid_t
;
typedef
unsigned
short
__kernel_old_uid_t
;
#define __kernel_old_uid_t __kernel_old_uid_t
typedef
unsigned
short
__kernel_old_gid_t
;
typedef
unsigned
short
__kernel_old_gid_t
;
#define __kernel_old_gid_t __kernel_old_gid_t
typedef
unsigned
short
__kernel_old_dev_t
;
typedef
unsigned
short
__kernel_old_dev_t
;
#define __kernel_old_dev_t __kernel_old_dev_t
#ifdef __GNUC__
#include <asm-generic/posix_types.h>
typedef
long
long
__kernel_loff_t
;
#endif
typedef
struct
{
int
val
[
2
];
}
__kernel_fsid_t
;
#if defined(__KERNEL__)
#undef __FD_SET
static
__inline__
void
__FD_SET
(
unsigned
long
__fd
,
__kernel_fd_set
*
__fdsetp
)
{
unsigned
long
__tmp
=
__fd
/
__NFDBITS
;
unsigned
long
__rem
=
__fd
%
__NFDBITS
;
__fdsetp
->
fds_bits
[
__tmp
]
|=
(
1UL
<<
__rem
);
}
#undef __FD_CLR
static
__inline__
void
__FD_CLR
(
unsigned
long
__fd
,
__kernel_fd_set
*
__fdsetp
)
{
unsigned
long
__tmp
=
__fd
/
__NFDBITS
;
unsigned
long
__rem
=
__fd
%
__NFDBITS
;
__fdsetp
->
fds_bits
[
__tmp
]
&=
~
(
1UL
<<
__rem
);
}
#undef __FD_ISSET
static
__inline__
int
__FD_ISSET
(
unsigned
long
__fd
,
const
__kernel_fd_set
*
__p
)
{
unsigned
long
__tmp
=
__fd
/
__NFDBITS
;
unsigned
long
__rem
=
__fd
%
__NFDBITS
;
return
(
__p
->
fds_bits
[
__tmp
]
&
(
1UL
<<
__rem
))
!=
0
;
}
/*
* This will unroll the loop for the normal constant case (8 ints,
* for a 256-bit fd_set)
*/
#undef __FD_ZERO
static
__inline__
void
__FD_ZERO
(
__kernel_fd_set
*
__p
)
{
unsigned
long
*
__tmp
=
__p
->
fds_bits
;
int
__i
;
if
(
__builtin_constant_p
(
__FDSET_LONGS
))
{
switch
(
__FDSET_LONGS
)
{
case
16
:
__tmp
[
0
]
=
0
;
__tmp
[
1
]
=
0
;
__tmp
[
2
]
=
0
;
__tmp
[
3
]
=
0
;
__tmp
[
4
]
=
0
;
__tmp
[
5
]
=
0
;
__tmp
[
6
]
=
0
;
__tmp
[
7
]
=
0
;
__tmp
[
8
]
=
0
;
__tmp
[
9
]
=
0
;
__tmp
[
10
]
=
0
;
__tmp
[
11
]
=
0
;
__tmp
[
12
]
=
0
;
__tmp
[
13
]
=
0
;
__tmp
[
14
]
=
0
;
__tmp
[
15
]
=
0
;
return
;
case
8
:
__tmp
[
0
]
=
0
;
__tmp
[
1
]
=
0
;
__tmp
[
2
]
=
0
;
__tmp
[
3
]
=
0
;
__tmp
[
4
]
=
0
;
__tmp
[
5
]
=
0
;
__tmp
[
6
]
=
0
;
__tmp
[
7
]
=
0
;
return
;
case
4
:
__tmp
[
0
]
=
0
;
__tmp
[
1
]
=
0
;
__tmp
[
2
]
=
0
;
__tmp
[
3
]
=
0
;
return
;
}
}
__i
=
__FDSET_LONGS
;
while
(
__i
)
{
__i
--
;
*
__tmp
=
0
;
__tmp
++
;
}
}
#endif
/* defined(__KERNEL__) */
#endif
/* __ASM_SH
64_POSIX_TYPES
_H */
#endif
/* __ASM_SH
_POSIX_TYPES_64
_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录