Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
eba67ce4
Commit
eba67ce4
authored
Jan 26, 2013
by
Danilo Sabato
Committed by
Alessandro Rubini
Feb 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arch-bare-linux: syscall: added get/settimeofday, adjtimex, socket_shutdown
parent
60f76d26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
bare-linux.h
arch-bare-linux/bare-linux.h
+5
-0
syscalls.c
arch-bare-linux/syscalls.c
+23
-0
No files found.
arch-bare-linux/bare-linux.h
View file @
eba67ce4
...
...
@@ -31,6 +31,11 @@ extern int sys_socket(int domain, int type, int proto);
extern
int
sys_bind
(
int
fd
,
const
struct
bare_sockaddr
*
addr
,
int
addrlen
);
extern
int
sys_recv
(
int
fd
,
void
*
pkt
,
int
plen
,
int
flags
);
extern
int
sys_send
(
int
fd
,
void
*
pkt
,
int
plen
,
int
flags
);
extern
int
sys_shutdown
(
int
fd
,
int
flags
);
extern
int
sys_gettimeofday
(
void
*
tv
,
void
*
z
);
extern
int
sys_settimeofday
(
void
*
tv
,
void
*
z
);
extern
int
sys_adjtimex
(
void
*
tv
);
extern
int
bare_errno
;
...
...
arch-bare-linux/syscalls.c
View file @
eba67ce4
...
...
@@ -24,6 +24,9 @@ _syscall1(int, time, void *, tz)
_syscall3
(
int
,
ioctl
,
int
,
fd
,
int
,
cmd
,
void
*
,
arg
)
_syscall1
(
int
,
select
,
struct
sel_arg_struct
*
,
as
)
static
_syscall2
(
int
,
socketcall
,
int
,
call
,
unsigned
long
*
,
args
)
_syscall2
(
int
,
gettimeofday
,
void
*
,
tv
,
void
*
,
z
);
_syscall2
(
int
,
settimeofday
,
void
*
,
tv
,
void
*
,
z
);
_syscall1
(
int
,
adjtimex
,
void
*
,
tv
);
/*
* In the bare arch I'd better use sys_ prefixed names
...
...
@@ -47,6 +50,19 @@ int sys_select(int max, void *in, void *out, void *exc, void *tout)
as
.
tvp
=
tout
;
return
select
(
&
as
);
}
int
sys_gettimeofday
(
void
*
tv
,
void
*
z
)
{
return
gettimeofday
(
tv
,
z
);
}
int
sys_settimeofday
(
void
*
tv
,
void
*
z
)
{
return
settimeofday
(
tv
,
z
);
}
int
sys_adjtimex
(
void
*
tv
)
{
return
adjtimex
(
tv
);
}
/* i386 has the socketcall thing. Bah! */
#define SYS_SOCKET 1
/* sys_socket(2) */
...
...
@@ -108,3 +124,10 @@ int sys_send(int fd, void *pkt, int plen, int flags)
args
[
3
]
=
flags
;
return
socketcall
(
SYS_SEND
,
args
);
}
int
sys_shutdown
(
int
fd
,
int
flags
)
{
args
[
0
]
=
fd
;
args
[
1
]
=
flags
;
return
socketcall
(
SYS_SHUTDOWN
,
args
);
}
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