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
2346b806
Commit
2346b806
authored
Oct 16, 2015
by
Doug Rupp
Committed by
Arnaud Charlet
Oct 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code clean up.
From-SVN: r228903
parent
51cf5b3e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
52 deletions
+8
-52
gcc/ada/ChangeLog
+2
-1
gcc/ada/a-extiin.ads
+2
-2
gcc/ada/s-osinte-android.adb
+1
-46
gcc/ada/s-osinte-android.ads
+3
-3
No files found.
gcc/ada/ChangeLog
View file @
2346b806
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
*
s
-
taprop
-
linux
.
adb
(
Monotonic_Clock
):
Call
clock_gettime
*
s
-
taprop
-
linux
.
adb
(
Monotonic_Clock
):
Call
clock_gettime
instead
of
gettimeofday
.
instead
of
gettimeofday
.
*
s
-
osinte
-
linux
.
ads
(
clock_gettime
):
New
imported
subprogram
.
*
s
-
osinte
-
android
.
ads
,
s
-
osinte
-
android
.
adb
,
s
-
osinte
-
linux
.
ads
(
clock_gettime
):
New
imported
subprogram
.
2015
-
10
-
16
Hristian
Kirtchev
<
kirtchev
@
adacore
.
com
>
2015
-
10
-
16
Hristian
Kirtchev
<
kirtchev
@
adacore
.
com
>
...
...
gcc/ada/a-extiin.ads
View file @
2346b806
...
@@ -19,8 +19,8 @@ package Ada.Execution_Time.Interrupts is
...
@@ -19,8 +19,8 @@ package Ada.Execution_Time.Interrupts is
pragma
Unimplemented_Unit
;
pragma
Unimplemented_Unit
;
function
Clock
(
Interrupt
:
Ada
.
Interrupts
.
Interrupt_I
d
)
return
CPU_Time
;
function
Clock
(
Interrupt
:
Ada
.
Interrupts
.
Interrupt_I
D
)
return
CPU_Time
;
function
Supported
(
Interrupt
:
Ada
.
Interrupts
.
Interrupt_I
d
)
return
Boolean
;
function
Supported
(
Interrupt
:
Ada
.
Interrupts
.
Interrupt_I
D
)
return
Boolean
;
end
Ada
.
Execution_Time
.
Interrupts
;
end
Ada
.
Execution_Time
.
Interrupts
;
gcc/ada/s-osinte-android.adb
View file @
2346b806
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
--
--
--
--
--
B
o
d
y
--
--
B
o
d
y
--
--
--
--
--
--
Copyright
(
C
)
1995
-
201
4
,
AdaCore
--
--
Copyright
(
C
)
1995
-
201
5
,
AdaCore
--
--
--
--
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
...
@@ -39,7 +39,6 @@ pragma Polling (Off);
...
@@ -39,7 +39,6 @@ pragma Polling (Off);
--
that
are
needed
by
children
of
System
.
--
that
are
needed
by
children
of
System
.
with
Interfaces
.
C
;
use
Interfaces
.
C
;
with
Interfaces
.
C
;
use
Interfaces
.
C
;
with
Interfaces
.
C
.
Extensions
;
use
Interfaces
.
C
.
Extensions
;
package
body
System
.
OS_Interface
is
package
body
System
.
OS_Interface
is
...
@@ -76,48 +75,4 @@ package body System.OS_Interface is
...
@@ -76,48 +75,4 @@ package body System.OS_Interface is
tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
end To_Timespec;
end To_Timespec;
-------------------
-- clock_gettime --
-------------------
function clock_gettime
(clock_id : clockid_t;
tp : access timespec) return int
is
pragma Unreferenced (clock_id);
-- Android/Linux don'
t
have
clock_gettime
,
so
use
gettimeofday
use
Interfaces
;
type
timeval
is
array
(
1
..
3
)
of
C
.
long
;
--
The
timeval
array
is
sized
to
contain
long_long
sec
and
long
usec
.
--
If
long_long
'Size = long'
Size
then
it
will
be
overly
large
but
that
--
won
't effect the implementation since it'
s
not
accessed
directly
.
procedure
timeval_to_duration
(
T
:
not
null
access
timeval
;
sec
:
not
null
access
C
.
Extensions
.
long_long
;
usec
:
not
null
access
C
.
long
);
pragma
Import
(
C
,
timeval_to_duration
,
"__gnat_timeval_to_duration"
);
Micro
:
constant
:=
10
**
6
;
sec
:
aliased
C
.
Extensions
.
long_long
;
usec
:
aliased
C
.
long
;
TV
:
aliased
timeval
;
Result
:
int
;
function
gettimeofday
(
Tv
:
access
timeval
;
Tz
:
System
.
Address
:=
System
.
Null_Address
)
return
int
;
pragma
Import
(
C
,
gettimeofday
,
"gettimeofday"
);
begin
Result
:=
gettimeofday
(
TV
'Access, System.Null_Address);
pragma Assert (Result = 0);
timeval_to_duration (TV'
Access
,
sec
'Access, usec'
Access
);
tp
.
all
:=
To_Timespec
(
Duration
(
sec
)
+
Duration
(
usec
)
/
Micro
);
return
Result
;
end
clock_gettime
;
end System.OS_Interface;
end System.OS_Interface;
gcc/ada/s-osinte-android.ads
View file @
2346b806
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
--
--
--
--
--
S
p
e
c
--
--
S
p
e
c
--
--
--
--
--
--
Copyright
(
C
)
1995
-
201
4
,
Free
Software
Foundation
,
Inc
.
--
--
Copyright
(
C
)
1995
-
201
5
,
Free
Software
Foundation
,
Inc
.
--
--
--
--
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
...
@@ -208,8 +208,8 @@ package System.OS_Interface is
...
@@ -208,8 +208,8 @@ package System.OS_Interface is
type
clockid_t
is
new
int
;
type
clockid_t
is
new
int
;
function
clock_gettime
function
clock_gettime
(
clock_id
:
clockid_t
;
(
clock_id
:
clockid_t
;
tp
:
access
timespec
)
return
int
;
tp
:
access
timespec
)
return
int
;
pragma
Import
(
C
,
clock_gettime
,
"clock_gettime"
)
;
function
clock_getres
function
clock_getres
(
clock_id
:
clockid_t
;
(
clock_id
:
clockid_t
;
...
...
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