FreeCalypso > hg > fc-sim-tools
annotate calypso/nonblock.c @ 51:0299c16f2ab1
README: update for current state
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 Mar 2021 08:25:48 +0000 |
parents | f6b03af63bf7 |
children |
rev | line source |
---|---|
5
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This module contains the set_serial_nonblock() function. |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <sys/types.h> |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <sys/ioctl.h> |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <unistd.h> |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 extern int target_fd; |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 set_serial_nonblock(state) |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 int state; |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 { |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 ioctl(target_fd, FIONBIO, &state); |
f6b03af63bf7
fcsim-calypso-be: add FIONBIO setting to 0
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 } |