Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0ffe9b33
Commit
0ffe9b33
authored
Jul 08, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: SEMTIMEDOP for both Sparc ports.
parent
a1bafab5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
3 deletions
+29
-3
arch/sparc/kernel/sys_sparc.c
arch/sparc/kernel/sys_sparc.c
+4
-1
arch/sparc64/kernel/sys_sparc.c
arch/sparc64/kernel/sys_sparc.c
+4
-1
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+19
-1
include/asm-sparc/ipc.h
include/asm-sparc/ipc.h
+1
-0
include/asm-sparc64/ipc.h
include/asm-sparc64/ipc.h
+1
-0
No files found.
arch/sparc/kernel/sys_sparc.c
View file @
0ffe9b33
...
...
@@ -123,7 +123,10 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
if
(
call
<=
SEMCTL
)
switch
(
call
)
{
case
SEMOP
:
err
=
sys_semop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
);
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
,
NULL
);
goto
out
;
case
SEMTIMEDOP
:
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
,
(
const
struct
timespec
__user
*
)
fifth
);
goto
out
;
case
SEMGET
:
err
=
sys_semget
(
first
,
second
,
third
);
...
...
arch/sparc64/kernel/sys_sparc.c
View file @
0ffe9b33
...
...
@@ -182,7 +182,10 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
if
(
call
<=
SEMCTL
)
switch
(
call
)
{
case
SEMOP
:
err
=
sys_semop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
);
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
NULL
);
goto
out
;
case
SEMTIMEDOP
:
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
(
const
struct
timespec
*
)
fifth
);
goto
out
;
case
SEMGET
:
err
=
sys_semget
(
first
,
second
,
(
int
)
third
);
...
...
arch/sparc64/kernel/sys_sparc32.c
View file @
0ffe9b33
...
...
@@ -736,6 +736,22 @@ static int do_sys32_shmctl (int first, int second, void *uptr)
return
err
;
}
static
int
sys32_semtimedop
(
int
semid
,
struct
sembuf
*
tsems
,
int
nsems
,
const
struct
compat_timespec
*
timeout32
)
{
struct
compat_timespec
t32
;
struct
timespec
*
t64
=
compat_alloc_user_space
(
sizeof
(
*
t64
));
if
(
copy_from_user
(
&
t32
,
timeout32
,
sizeof
(
t32
)))
return
-
EFAULT
;
if
(
put_user
(
t32
.
tv_sec
,
&
t64
->
tv_sec
)
||
put_user
(
t32
.
tv_nsec
,
&
t64
->
tv_nsec
))
return
-
EFAULT
;
return
sys_semtimedop
(
semid
,
tsems
,
nsems
,
t64
);
}
asmlinkage
int
sys32_ipc
(
u32
call
,
int
first
,
int
second
,
int
third
,
u32
ptr
,
u32
fifth
)
{
int
version
,
err
;
...
...
@@ -747,8 +763,10 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
switch
(
call
)
{
case
SEMOP
:
/* struct sembuf is the same on 32 and 64bit :)) */
err
=
sys_sem
op
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
);
err
=
sys_sem
timedop
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
,
NULL
);
goto
out
;
case
SEMTIMEDOP
:
err
=
sys32_semtimedop
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
,
(
const
struct
compat_timespec
*
)
AA
(
fifth
));
case
SEMGET
:
err
=
sys_semget
(
first
,
second
,
third
);
goto
out
;
...
...
include/asm-sparc/ipc.h
View file @
0ffe9b33
...
...
@@ -14,6 +14,7 @@ struct ipc_kludge {
#define SEMOP 1
#define SEMGET 2
#define SEMCTL 3
#define SEMTIMEDOP 4
#define MSGSND 11
#define MSGRCV 12
#define MSGGET 13
...
...
include/asm-sparc64/ipc.h
View file @
0ffe9b33
...
...
@@ -14,6 +14,7 @@ struct ipc_kludge {
#define SEMOP 1
#define SEMGET 2
#define SEMCTL 3
#define SEMTIMEDOP 4
#define MSGSND 11
#define MSGRCV 12
#define MSGGET 13
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment