зеркало из https://github.com/github/ruby.git
* include/ruby/intern.h: remove rb_fd_copy() to rb_fd_dup() and
rb_w32_fdcopy() to rb_w32_fd_dup(). * win32/win32.c: ditto. * thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
29c2876d61
Коммит
2b7996e839
|
@ -1,3 +1,10 @@
|
|||
Sun May 15 23:45:11 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* include/ruby/intern.h: remove rb_fd_copy() to rb_fd_dup() and
|
||||
rb_w32_fdcopy() to rb_w32_fd_dup().
|
||||
* win32/win32.c: ditto.
|
||||
* thread.c: ditto.
|
||||
|
||||
Sun May 15 22:26:39 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||
|
||||
* signal.c (rb_f_kill): accept '-SIGXXX' style signal with Symbol or
|
||||
|
|
|
@ -250,7 +250,7 @@ void rb_fd_zero(rb_fdset_t *);
|
|||
void rb_fd_set(int, rb_fdset_t *);
|
||||
void rb_fd_clr(int, rb_fdset_t *);
|
||||
int rb_fd_isset(int, const rb_fdset_t *);
|
||||
void rb_fd_copy(rb_fdset_t *dst, const rb_fdset_t *src);
|
||||
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
|
||||
int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
|
||||
|
||||
#define rb_fd_ptr(f) ((f)->fdset)
|
||||
|
@ -269,8 +269,8 @@ void rb_fd_term(rb_fdset_t *);
|
|||
void rb_fd_set(int, rb_fdset_t *);
|
||||
#define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
|
||||
#define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
|
||||
#define rb_fd_copy(d, s) rb_w32_fdcopy((d), (s))
|
||||
void rb_w32_fdcopy(rb_fdset_t *dst, const rb_fdset_t *src);
|
||||
#define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
|
||||
void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
|
||||
#define rb_fd_select(n, rfds, wfds, efds, timeout) rb_w32_select((n), (rfds) ? ((rb_fdset_t*)(rfds))->fdset : NULL, (wfds) ? ((rb_fdset_t*)(wfds))->fdset : NULL, (efds) ? ((rb_fdset_t*)(efds))->fdset: NULL, (timeout))
|
||||
#define rb_fd_resize(n, f) ((void)(f))
|
||||
|
||||
|
@ -284,7 +284,7 @@ typedef fd_set rb_fdset_t;
|
|||
#define rb_fd_set(n, f) FD_SET((n), (f))
|
||||
#define rb_fd_clr(n, f) FD_CLR((n), (f))
|
||||
#define rb_fd_isset(n, f) FD_ISSET((n), (f))
|
||||
#define rb_fd_copy(d, s) (*(d) = *(s))
|
||||
#define rb_fd_dup(d, s) (*(d) = *(s))
|
||||
#define rb_fd_resize(n, f) ((void)(f))
|
||||
#define rb_fd_ptr(f) (f)
|
||||
#define rb_fd_init(f) FD_ZERO(f)
|
||||
|
|
16
thread.c
16
thread.c
|
@ -2392,7 +2392,7 @@ rb_fd_isset(int n, const rb_fdset_t *fds)
|
|||
}
|
||||
|
||||
void
|
||||
rb_fd_copy(rb_fdset_t *dst, const rb_fdset_t *src)
|
||||
rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
|
||||
{
|
||||
size_t size = howmany(rb_fd_max(src), NFDBITS) * sizeof(fd_mask);
|
||||
|
||||
|
@ -2446,7 +2446,7 @@ void
|
|||
rb_fd_init_copy(rb_fdset_t *dst, rb_fdset_t *src)
|
||||
{
|
||||
rb_fd_init(dst);
|
||||
rb_fd_copy(dst, src);
|
||||
rb_fd_dup(dst, src);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2567,11 +2567,11 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
|
|||
if (result != 0) break;
|
||||
|
||||
if (read)
|
||||
rb_fd_copy(read, &orig_read);
|
||||
rb_fd_dup(read, &orig_read);
|
||||
if (write)
|
||||
rb_fd_copy(write, &orig_write);
|
||||
rb_fd_dup(write, &orig_write);
|
||||
if (except)
|
||||
rb_fd_copy(except, &orig_except);
|
||||
rb_fd_dup(except, &orig_except);
|
||||
if (timeout) {
|
||||
struct timeval elapsed;
|
||||
gettimeofday(&elapsed, NULL);
|
||||
|
@ -2603,11 +2603,11 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
|
|||
case ERESTART:
|
||||
#endif
|
||||
if (read)
|
||||
rb_fd_copy(read, &orig_read);
|
||||
rb_fd_dup(read, &orig_read);
|
||||
if (write)
|
||||
rb_fd_copy(write, &orig_write);
|
||||
rb_fd_dup(write, &orig_write);
|
||||
if (except)
|
||||
rb_fd_copy(except, &orig_except);
|
||||
rb_fd_dup(except, &orig_except);
|
||||
|
||||
if (timeout) {
|
||||
double d = limit - timeofday();
|
||||
|
|
|
@ -2368,7 +2368,7 @@ rb_w32_fdisset(int fd, fd_set *set)
|
|||
}
|
||||
|
||||
void
|
||||
rb_w32_fdcopy(rb_fdset_t *dst, const rb_fdset_t *src)
|
||||
rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
|
||||
{
|
||||
if ((UINT)dst->capa < src->fdset->fd_count) {
|
||||
dst->capa = (src->fdset->fd_count / FD_SETSIZE + 1) * FD_SETSIZE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче