Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Ben Avison
InetRes
Commits
96515edd
Commit
96515edd
authored
Jul 14, 1998
by
Stewart Brodie
Browse files
Sets sockets as taskwindow-friendly so machine doesn't halt when using the tool.
parent
ac05d186
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
Sources/pong/c/Pong
Sources/pong/c/Pong
+26
-0
No files found.
Sources/pong/c/Pong
View file @
96515edd
...
...
@@ -47,6 +47,8 @@ static char RcsId[] = "$Header$";
#ifdef __riscos
#include "riscos.h"
#include "kernel.h"
#define OS_Upcall (0x33)
#endif
#include "sys/errno.h"
#include "netdb.h"
...
...
@@ -528,6 +530,14 @@ main(int argc, char **argv)
exit
(
3
);
}
#ifdef __riscos
{
int
one
=
1
;
(
void
)
ioctl
(
icmp_sock
,
FIOSLEEPTW
,
&
one
);
(
void
)
ioctl
(
sock
,
FIOSLEEPTW
,
&
one
);
}
#endif
if
(
!
Broadcast
)
{
/*
...
...
@@ -658,7 +668,23 @@ main(int argc, char **argv)
dc
.
tv_sec
=
repeat_delay
/
1000000
;
dc
.
tv_usec
=
repeat_delay
%
1000000
;
#ifdef __riscos
{
struct
timeval
tc
;
gettimeofday
(
&
tc
,
NULL
);
dc
.
tv_usec
+=
tc
.
tv_usec
;
dc
.
tv_sec
+=
tc
.
tv_sec
+
(
dc
.
tv_usec
/
1000000
);
dc
.
tv_usec
=
dc
.
tv_usec
%
1000000
;
while
(
tc
.
tv_sec
<
dc
.
tv_sec
||
(
tc
.
tv_sec
==
dc
.
tv_sec
&&
tc
.
tv_usec
<
dc
.
tv_usec
))
{
_kernel_swi_regs
r
=
{
6
};
(
void
)
_kernel_swi
(
OS_Upcall
,
&
r
,
&
r
);
gettimeofday
(
&
tc
,
NULL
);
}
}
#else
(
void
)
select
(
0
,
NULL
,
NULL
,
NULL
,
&
dc
);
#endif
}
}
...
...
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