Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f51c1494
Commit
f51c1494
authored
Sep 28, 2003
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Convert tv_add from static inline to a macro to fix an obscure
assembler problem with parisc64.
parent
633dba2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
include/net/sctp/sctp.h
include/net/sctp/sctp.h
+13
-16
net/sctp/sm_make_chunk.c
net/sctp/sm_make_chunk.c
+1
-1
No files found.
include/net/sctp/sctp.h
View file @
f51c1494
...
@@ -495,22 +495,19 @@ for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \
...
@@ -495,22 +495,19 @@ for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \
#define tv_lt(s, t) \
#define tv_lt(s, t) \
(s.tv_sec < t.tv_sec || (s.tv_sec == t.tv_sec && s.tv_usec < t.tv_usec))
(s.tv_sec < t.tv_sec || (s.tv_sec == t.tv_sec && s.tv_usec < t.tv_usec))
/* Stolen from net/profile.h. Using it from there is more grief than
/* Add tv1 to tv2. */
* it is worth.
#define TIMEVAL_ADD(tv1, tv2) \
*/
({ \
static
inline
void
tv_add
(
const
struct
timeval
*
entered
,
struct
timeval
*
leaved
)
suseconds_t usecs = (tv2).tv_usec + (tv1).tv_usec; \
{
time_t secs = (tv2).tv_sec + (tv1).tv_sec; \
time_t
usecs
=
leaved
->
tv_usec
+
entered
->
tv_usec
;
\
time_t
secs
=
leaved
->
tv_sec
+
entered
->
tv_sec
;
if (usecs >= 1000000) { \
usecs -= 1000000; \
if
(
usecs
>=
1000000
)
{
secs++; \
usecs
-=
1000000
;
} \
secs
++
;
(tv2).tv_sec = secs; \
}
(tv2).tv_usec = usecs; \
leaved
->
tv_sec
=
secs
;
})
leaved
->
tv_usec
=
usecs
;
}
/* External references. */
/* External references. */
...
...
net/sctp/sm_make_chunk.c
View file @
f51c1494
...
@@ -1288,7 +1288,7 @@ sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,
...
@@ -1288,7 +1288,7 @@ sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,
/* Set an expiration time for the cookie. */
/* Set an expiration time for the cookie. */
do_gettimeofday
(
&
cookie
->
c
.
expiration
);
do_gettimeofday
(
&
cookie
->
c
.
expiration
);
tv_add
(
&
asoc
->
cookie_life
,
&
cookie
->
c
.
expiration
);
TIMEVAL_ADD
(
asoc
->
cookie_life
,
cookie
->
c
.
expiration
);
/* Copy the peer's init packet. */
/* Copy the peer's init packet. */
memcpy
(
&
cookie
->
c
.
peer_init
[
0
],
init_chunk
->
chunk_hdr
,
memcpy
(
&
cookie
->
c
.
peer_init
[
0
],
init_chunk
->
chunk_hdr
,
...
...
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