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
a4492d5b
Commit
a4492d5b
authored
May 20, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr-servo: avoid a libgcc 64-bit division
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
a3340842
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
wr-servo.c
proto-ext-whiterabbit/wr-servo.c
+5
-5
No files found.
proto-ext-whiterabbit/wr-servo.c
View file @
a4492d5b
...
...
@@ -49,14 +49,14 @@ static int64_t ts_to_picos(TimeInternal ts)
static
TimeInternal
picos_to_ts
(
int64_t
picos
)
{
int64_t
nsec
,
phase
;
u
int64_t
nsec
,
phase
;
TimeInternal
ts
;
phase
=
picos
%
1000
;
nsec
=
picos
/
1000
;
nsec
=
picos
;
phase
=
__div64_32
(
&
nsec
,
1000
)
;
ts
.
seconds
=
nsec
/
PP_NSEC_PER_SEC
;
ts
.
nanoseconds
=
nsec
%
PP_NSEC_PER_SEC
;
ts
.
nanoseconds
=
__div64_32
(
&
nsec
,
PP_NSEC_PER_SEC
)
;
ts
.
seconds
=
nsec
;
/* after the division */
ts
.
phase
=
phase
;
return
ts
;
}
...
...
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