Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FPGA Configuration Space
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
FPGA Configuration Space
Commits
9aa6bba6
Commit
9aa6bba6
authored
12 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
sdbfs: kerne/sdbfs-int: define htonll/ntohll for kernel space
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
d82ea99f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sdbfs/kernel/sdbfs-int.h
+16
-0
16 additions, 0 deletions
sdbfs/kernel/sdbfs-int.h
with
16 additions
and
0 deletions
sdbfs/kernel/sdbfs-int.h
+
16
−
0
View file @
9aa6bba6
...
...
@@ -22,4 +22,20 @@ struct sdbfs_inode {
struct
inode
ino
;
};
/* This is needed to convert endianness. Hoping it is not defined elsewhere */
static
inline
uint64_t
htonll
(
uint64_t
ll
)
{
uint64_t
res
;
if
(
htonl
(
1
)
==
1
)
return
ll
;
res
=
htonl
(
ll
>>
32
);
res
|=
(
uint64_t
)(
htonl
((
uint32_t
)
ll
))
<<
32
;
return
res
;
}
static
inline
uint64_t
ntohll
(
uint64_t
ll
)
{
return
htonll
(
ll
);
}
#endif
/* __SDBFS_INT_H__ */
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment