diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-02 10:00:10 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-02 10:00:10 +0000 |
commit | e44a6c470834afb67c596206461b66f329398962 (patch) | |
tree | 9c8f715222d20ef1f75699afb902b2500bed218a | |
parent | db197f296fa0d8d1f3b21f8cfa644eb3e0c5971b (diff) | |
download | ruby-e44a6c470834afb67c596206461b66f329398962.tar.gz |
move the previous comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | include/ruby/intern.h | 26 | ||||
-rw-r--r-- | thread.c | 28 |
2 files changed, 28 insertions, 26 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index c7a4830b06..a2d4fcb91a 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -201,32 +201,6 @@ int rb_sourceline(void); const char *rb_sourcefile(void); #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT) - -/* - * several Unix platform supports file descriptors bigger than FD_SETSIZE - * in select(2) system call. - * - * - Linux 2.2.12 (?) - * - NetBSD 1.2 (src/sys/kern/sys_generic.c:1.25) - * select(2) documents how to allocate fd_set dynamically. - * http://netbsd.gw.com/cgi-bin/man-cgi?select++NetBSD-4.0 - * - FreeBSD 2.2 (src/sys/kern/sys_generic.c:1.19) - * - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4) - * select(2) documents how to allocate fd_set dynamically. - * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4 - * - HP-UX documents how to allocate fd_set dynamically. - * http://docs.hp.com/en/B2355-60105/select.2.html - * - Solaris 8 has select_large_fdset - * - * When fd_set is not big enough to hold big file descriptors, - * it should be allocated dynamically. - * Note that this assumes fd_set is structured as bitmap. - * - * rb_fd_init allocates the memory. - * rb_fd_term free the memory. - * rb_fd_set may re-allocates bitmap. - */ - typedef struct { int maxfd; fd_set *fdset; @@ -2003,6 +2003,34 @@ rb_thread_priority_set(VALUE thread, VALUE prio) /* for IO */ #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT) + +/* + * several Unix platform supports file descriptors bigger than FD_SETSIZE + * in select(2) system call. + * + * - Linux 2.2.12 (?) + * - NetBSD 1.2 (src/sys/kern/sys_generic.c:1.25) + * select(2) documents how to allocate fd_set dynamically. + * http://netbsd.gw.com/cgi-bin/man-cgi?select++NetBSD-4.0 + * - FreeBSD 2.2 (src/sys/kern/sys_generic.c:1.19) + * - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4) + * select(2) documents how to allocate fd_set dynamically. + * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4 + * - HP-UX documents how to allocate fd_set dynamically. + * http://docs.hp.com/en/B2355-60105/select.2.html + * - Solaris 8 has select_large_fdset + * + * When fd_set is not big enough to hold big file descriptors, + * it should be allocated dynamically. + * Note that this assumes fd_set is structured as bitmap. + * + * rb_fd_init allocates the memory. + * rb_fd_term free the memory. + * rb_fd_set may re-allocates bitmap. + * + * So rb_fd_set doesn't reject file descriptors bigger than FD_SETSIZE. + */ + void rb_fd_init(volatile rb_fdset_t *fds) { |