Changeset b4e3b2b in rtems
- Timestamp:
- 10/28/98 19:25:12 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 22fa5832
- Parents:
- 692b9f7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/cpu/unix/cpu.c
r692b9f7 rb4e3b2b 401 401 if (sync_io_nfds) { 402 402 int result; 403 403 fd_set readfds, writefds, exceptfds; 404 405 readfds = sync_io_readfds; 406 writefds = sync_io_writefds; 407 exceptfds = sync_io_exceptfds; 404 408 result = select(sync_io_nfds, 405 & sync_io_readfds,406 & sync_io_writefds,407 & sync_io_exceptfds,409 &readfds, 410 &writefds, 411 &exceptfds, 408 412 NULL); 409 413 410 if ((result < 0) && (errno != EINTR)) 411 _CPU_Fatal_error(0x200); /* FIXME : what number should go here !! */ 414 if (result < 0) { 415 if (errno != EINTR) 416 _CPU_Fatal_error(0x200); /* FIXME : what number should go here !! */ 417 _Thread_Dispatch(); 418 continue; 419 } 412 420 413 421 for (fd = 0; fd < sync_io_nfds; fd++) { 414 boolean read = FD_ISSET(fd, & sync_io_readfds);415 boolean write = FD_ISSET(fd, & sync_io_writefds);416 boolean except = FD_ISSET(fd, & sync_io_exceptfds);422 boolean read = FD_ISSET(fd, &readfds); 423 boolean write = FD_ISSET(fd, &writefds); 424 boolean except = FD_ISSET(fd, &exceptfds); 417 425 418 426 if (_CPU_Sync_io_handlers[fd] && (read || write || except)) 419 427 _CPU_Sync_io_handlers[fd](fd, read, write, except); 420 421 _Thread_Dispatch();422 428 } 429 430 _Thread_Dispatch(); 423 431 } else 424 432 pause(); … … 870 878 FD_ISSET(fd, &sync_io_writefds) || 871 879 FD_ISSET(fd, &sync_io_exceptfds)) 872 sync_io_nfds = fd ;880 sync_io_nfds = fd + 1; 873 881 return 0; 874 882 } -
cpukit/score/cpu/unix/cpu.c
r692b9f7 rb4e3b2b 401 401 if (sync_io_nfds) { 402 402 int result; 403 403 fd_set readfds, writefds, exceptfds; 404 405 readfds = sync_io_readfds; 406 writefds = sync_io_writefds; 407 exceptfds = sync_io_exceptfds; 404 408 result = select(sync_io_nfds, 405 & sync_io_readfds,406 & sync_io_writefds,407 & sync_io_exceptfds,409 &readfds, 410 &writefds, 411 &exceptfds, 408 412 NULL); 409 413 410 if ((result < 0) && (errno != EINTR)) 411 _CPU_Fatal_error(0x200); /* FIXME : what number should go here !! */ 414 if (result < 0) { 415 if (errno != EINTR) 416 _CPU_Fatal_error(0x200); /* FIXME : what number should go here !! */ 417 _Thread_Dispatch(); 418 continue; 419 } 412 420 413 421 for (fd = 0; fd < sync_io_nfds; fd++) { 414 boolean read = FD_ISSET(fd, & sync_io_readfds);415 boolean write = FD_ISSET(fd, & sync_io_writefds);416 boolean except = FD_ISSET(fd, & sync_io_exceptfds);422 boolean read = FD_ISSET(fd, &readfds); 423 boolean write = FD_ISSET(fd, &writefds); 424 boolean except = FD_ISSET(fd, &exceptfds); 417 425 418 426 if (_CPU_Sync_io_handlers[fd] && (read || write || except)) 419 427 _CPU_Sync_io_handlers[fd](fd, read, write, except); 420 421 _Thread_Dispatch();422 428 } 429 430 _Thread_Dispatch(); 423 431 } else 424 432 pause(); … … 870 878 FD_ISSET(fd, &sync_io_writefds) || 871 879 FD_ISSET(fd, &sync_io_exceptfds)) 872 sync_io_nfds = fd ;880 sync_io_nfds = fd + 1; 873 881 return 0; 874 882 }
Note: See TracChangeset
for help on using the changeset viewer.