Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
10f5ffa4
Commit
10f5ffa4
authored
Feb 02, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: Add syscall.Times.
From-SVN: r183826
parent
3375a6c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
libgo/go/syscall/libcall_posix.go
+5
-6
libgo/mksysinfo.sh
+10
-0
No files found.
libgo/go/syscall/libcall_posix.go
View file @
10f5ffa4
...
@@ -133,15 +133,15 @@ type FdSet struct {
...
@@ -133,15 +133,15 @@ type FdSet struct {
}
}
func
FDSet
(
fd
int
,
set
*
FdSet
)
{
func
FDSet
(
fd
int
,
set
*
FdSet
)
{
set
.
Bits
[
fd
/
nfdbits
]
|=
(
1
<<
(
uint
)(
fd
%
nfdbits
))
set
.
Bits
[
fd
/
nfdbits
]
|=
(
1
<<
(
uint
)(
fd
%
nfdbits
))
}
}
func
FDClr
(
fd
int
,
set
*
FdSet
)
{
func
FDClr
(
fd
int
,
set
*
FdSet
)
{
set
.
Bits
[
fd
/
nfdbits
]
&^=
(
1
<<
(
uint
)(
fd
%
nfdbits
))
set
.
Bits
[
fd
/
nfdbits
]
&^=
(
1
<<
(
uint
)(
fd
%
nfdbits
))
}
}
func
FDIsSet
(
fd
int
,
set
*
FdSet
)
bool
{
func
FDIsSet
(
fd
int
,
set
*
FdSet
)
bool
{
if
set
.
Bits
[
fd
/
nfdbits
]
&
(
1
<<
(
uint
)(
fd
%
nfdbits
))
!=
0
{
if
set
.
Bits
[
fd
/
nfdbits
]
&
(
1
<<
(
uint
)(
fd
%
nfdbits
))
!=
0
{
return
true
return
true
}
else
{
}
else
{
return
false
return
false
...
@@ -323,9 +323,8 @@ func Settimeofday(tv *Timeval) (err error) {
...
@@ -323,9 +323,8 @@ func Settimeofday(tv *Timeval) (err error) {
// //sysnb Time(t *Time_t) (tt Time_t, err error)
// //sysnb Time(t *Time_t) (tt Time_t, err error)
// //time(t *Time_t) Time_t
// //time(t *Time_t) Time_t
// FIXME: mksysinfo Tms
//sysnb Times(tms *Tms) (ticks uintptr, err error)
// //sysnb Times(tms *Tms) (ticks uintptr, err error)
//times(tms *Tms) _clock_t
// //times(tms *Tms) _clock_t
//sysnb Umask(mask int) (oldmask int)
//sysnb Umask(mask int) (oldmask int)
//umask(mask Mode_t) Mode_t
//umask(mask Mode_t) Mode_t
...
...
libgo/mksysinfo.sh
View file @
10f5ffa4
...
@@ -66,6 +66,7 @@ cat > sysinfo.c <<EOF
...
@@ -66,6 +66,7 @@ cat > sysinfo.c <<EOF
#include <sys/socket.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/wait.h>
#include <sys/wait.h>
#include <sys/un.h>
#include <sys/un.h>
#if defined(HAVE_SYS_USER_H)
#if defined(HAVE_SYS_USER_H)
...
@@ -368,6 +369,15 @@ if test "$timestruc" != ""; then
...
@@ -368,6 +369,15 @@ if test "$timestruc" != ""; then
-e
's/tv_nsec *[a-zA-Z0-9_]*/Nsec Timestruc_nsec_t/'
>>
${
OUT
}
-e
's/tv_nsec *[a-zA-Z0-9_]*/Nsec Timestruc_nsec_t/'
>>
${
OUT
}
fi
fi
# The tms struct.
grep
'^type _tms '
gen-sysinfo.go |
\
sed
-e
's/type _tms/type Tms/'
\
-e
's/tms_utime/Utime/'
\
-e
's/tms_stime/Stime/'
\
-e
's/tms_cutime/Cutime/'
\
-e
's/tms_cstime/Cstime/'
\
>>
${
OUT
}
# The stat type.
# The stat type.
# Prefer largefile variant if available.
# Prefer largefile variant if available.
stat
=
`
grep
'^type _stat64 '
gen-sysinfo.go
||
true
`
stat
=
`
grep
'^type _stat64 '
gen-sysinfo.go
||
true
`
...
...
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