Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
649e059f
Commit
649e059f
authored
Jun 29, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RFsim: Mark FD non-blocking once; show errno on problem
parent
7e82f2f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+4
-4
No files found.
targets/ARCH/rfsimulator/simulator.c
View file @
649e059f
...
...
@@ -225,15 +225,16 @@ enum blocking_t {
};
static
void
setblocking
(
int
sock
,
enum
blocking_t
active
)
{
int
opts
;
AssertFatal
(
(
opts
=
fcntl
(
sock
,
F_GETFL
))
>=
0
,
""
);
int
opts
=
fcntl
(
sock
,
F_GETFL
)
;
AssertFatal
(
opts
>=
0
,
"fcntl(): errno %d, %s
\n
"
,
errno
,
strerror
(
errno
)
);
if
(
active
==
blocking
)
opts
=
opts
&
~
O_NONBLOCK
;
else
opts
=
opts
|
O_NONBLOCK
;
AssertFatal
(
fcntl
(
sock
,
F_SETFL
,
opts
)
>=
0
,
""
);
opts
=
fcntl
(
sock
,
F_SETFL
,
opts
);
AssertFatal
(
opts
>=
0
,
"fcntl(): errno %d, %s
\n
"
,
errno
,
strerror
(
errno
));
}
static
bool
flushInput
(
rfsimulator_state_t
*
t
,
int
timeout
,
int
nsamps
);
...
...
@@ -248,7 +249,6 @@ static void fullwrite(int fd, void *_buf, ssize_t count, rfsimulator_state_t *t)
"Bug: %d/%p/%zd/%p"
,
fd
,
_buf
,
count
,
t
);
char
*
buf
=
_buf
;
ssize_t
l
;
setblocking
(
fd
,
notBlocking
);
while
(
count
)
{
l
=
write
(
fd
,
buf
,
count
);
...
...
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