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
c2245332
Commit
c2245332
authored
Jul 20, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: Add semtimedop
parent
4b0466bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+22
-2
arch/ppc64/kernel/syscalls.c
arch/ppc64/kernel/syscalls.c
+6
-1
include/asm-ppc64/ipc.h
include/asm-ppc64/ipc.h
+1
-0
No files found.
arch/ppc64/kernel/sys_ppc32.c
View file @
c2245332
...
...
@@ -1773,6 +1773,22 @@ 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
);
}
/*
* Note: it is necessary to treat first_parm, second_parm, and
* third_parm as unsigned ints, with the corresponding cast to a
...
...
@@ -1795,8 +1811,12 @@ asmlinkage long sys32_ipc(u32 call, u32 first_parm, u32 second_parm, u32 third_p
case
SEMOP
:
/* struct sembuf is the same on 32 and 64bit :)) */
err
=
sys_semop
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
);
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
,
NULL
);
break
;
case
SEMTIMEDOP
:
err
=
sys32_semtimedop
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
,
(
const
struct
compat_timespec
*
)
AA
(
fifth
));
break
;
case
SEMGET
:
err
=
sys_semget
(
first
,
second
,
third
);
...
...
arch/ppc64/kernel/syscalls.c
View file @
c2245332
...
...
@@ -66,7 +66,12 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret
=
-
ENOSYS
;
switch
(
call
)
{
case
SEMOP
:
ret
=
sys_semop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
);
ret
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
NULL
);
break
;
case
SEMTIMEDOP
:
ret
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
(
const
struct
timespec
*
)
fifth
);
break
;
case
SEMGET
:
ret
=
sys_semget
(
first
,
second
,
third
);
...
...
include/asm-ppc64/ipc.h
View file @
c2245332
...
...
@@ -19,6 +19,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