On 09/12/16 21:26, Kevin Kirspel wrote:
@@ -280,10 +298,14 @@ start_worker(test_context *ctx)
static void
set_non_blocking(int fd, int enable)
{
- int rv;
+ int flags = fcntl(fd, F_GETFL, 0);
- rv = ioctl(fd, FIONBIO, &enable);
- assert(rv == 0);
+ if (enable ) {
+ fcntl(fd, F_SETFL, flags | O_NONBLOCK);
+ }
+ else{
+ fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
+ }
}
All return values should be checked in the tests. Please use BSD style
for the { }.
Please remove all white-space changes of original BSD files.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel