[#14614] 大小文字を無視した比較で ' 帰 ' == ' 蟻 ' ? — "K.Umakoshi" <pegacorn@...>

こんにちは。

18 messages 2001/09/02
[#14615] Re: 大小文字を無視した比較で ' 帰 ' == ' 蟻 ' ? — matz@... (Yukihiro Matsumoto) 2001/09/02

まつもと ゆきひろです

[#14662] How to abondon saved uid privilege — nobu.nakada@...

なかだです。

60 messages 2001/09/05
[#14663] Re: How to abondon saved uid privilege — nagai@... 2001/09/05

永井@知能.九工大です.

[#14672] Re: How to abondon saved uid privilege — nobu.nakada@... 2001/09/05

なかだです。

[#14677] Re: How to abondon saved uid privilege — nagai@... 2001/09/05

永井@知能.九工大です.

[#14678] Re: How to abondon saved uid privilege — matz@... (Yukihiro Matsumoto) 2001/09/05

まつもと ゆきひろです

[#14680] Re: How to abondon saved uid privilege — nagai@... 2001/09/05

永井@知能.九工大です.

[#14685] Re: How to abondon saved uid privilege — Takahiro Kambe <taca@...> 2001/09/05

In message <20010905184635H.nagai@ai.kyutech.ac.jp>

[#14687] Re: How to abondon saved uid privilege — "Akinori MUSHA" <knu@...> 2001/09/05

 ちょっと脱線します。 :)

[#14688] Re: How to abondon saved uid privilege — Takahiro Kambe <taca@...> 2001/09/05

In message <86ofopevkv.wl@archon.local.idaemons.org>

[#14691] Re: How to abondon saved uid privilege — matz@... (Yukihiro Matsumoto) 2001/09/05

まつもと ゆきひろです

[#14693] Re: How to abondon saved uid privilege — Takahiro Kambe <taca@...> 2001/09/05

In message <999700675.662743.18683.nullmailer@ev.netlab.jp>

[#14703] Re: How to abondon saved uid privilege — nagai@... 2001/09/06

永井@知能.九工大です.

[#14707] Re: How to abondon saved uid privilege — Takahiro Kambe <taca@...> 2001/09/06

In message <20010906111828R.nagai@ai.kyutech.ac.jp>

[#14708] Re: How to abondon saved uid privilege — nagai@... 2001/09/06

永井@知能.九工大です.

[#14709] Re: How to abondon saved uid privilege — Takahiro Kambe <taca@...> 2001/09/06

In message <20010906132656Z.nagai@ai.kyutech.ac.jp>

[#14728] Re: How to abondon saved uid privilege — nagai@... 2001/09/06

永井@知能.九工大です.

[#14729] Re: How to abondon saved uid privilege — Takahiro Kambe <taca@...> 2001/09/06

In message <20010906174440D.nagai@ai.kyutech.ac.jp>

[#14732] Re: How to abondon saved uid privilege — nagai@... 2001/09/06

永井@知能.九工大です.

[#14774] Re: How to abondon saved uid privilege — nagai@... 2001/09/12

永井@知能.九工大です.

[#14841] Re: How to abondon saved uid privilege — nagai@... 2001/10/02

永井@知能.九工大です.

[#15026] setuid and seteuid — nagai@... 2001/11/02

永井@知能.九工大です.

[#15030] Re: setuid and seteuid — Tanaka Akira <akr@...17n.org> 2001/11/03

In article <20011102175733K.nagai@ai.kyutech.ac.jp>,

[#15032] Re: setuid and seteuid — nagai@... 2001/11/03

永井@知能.九工大です.

[#14743] [BUG] $_ on thread switching — nobu.nakada@...

なかだです。

24 messages 2001/09/07
[#14746] Re: [BUG] $_ on thread switching — nobu.nakada@... 2001/09/07

なかだです。

[#14747] Re: [BUG] $_ on thread switching — matz@... (Yukihiro Matsumoto) 2001/09/07

まつもと ゆきひろです

[#14748] Re: [BUG] $_ on thread switching — nobu.nakada@... 2001/09/08

なかだです。

[#14750] Re: [BUG] $_ on thread switching — matz@... (Yukihiro Matsumoto) 2001/09/08

まつもと ゆきひろです

[#14752] Re: [BUG] $_ on thread switching — nobu.nakada@... 2001/09/08

なかだです。

[#14753] Re: [BUG] $_ on thread switching — matz@... (Yukihiro Matsumoto) 2001/09/08

まつもと ゆきひろです

[#14755] Re: [BUG] $_ on thread switching — nobu.nakada@... 2001/09/08

なかだです。

[ruby-dev:14809] WAIT_SELECT value with multithread

From: nobu.nakada@...
Date: 2001-09-21 04:17:14 UTC
List: ruby-dev #14809
なかだです。

 なんか古いパッチが出て来たんで出してみます。

 WAIT_SELECTしたときの戻り値に、他のスレッドの要求した分まで含
まれいてるような気がします。Thread.currentの要求したものだけを
返すようにするならたぶんこんな感じ。

	* eval.c (intersect_fds): counts intersecting fds.

	* eval.c (rb_thread_schedule): only fds requested by
	  each thread count as select_value.


Index: eval.c
===================================================================
RCS file: /cvs/ruby/src/ruby/eval.c,v
retrieving revision 1.199
diff -u -2 -p -r1.199 eval.c
--- eval.c	2001/08/14 08:13:26	1.199
+++ eval.c	2001/08/22 10:58:59
@@ -7474,10 +7474,10 @@ match_fds(dst, src, max)
 }
 
-static void
+static int
 intersect_fds(src, dst, max)
     fd_set *src, *dst;
     int max;
 {
-    int i;
+    int i, n = 0;
 
     for (i=0; i<=max; i++) {
@@ -7486,4 +7486,5 @@ intersect_fds(src, dst, max)
 		/* Wake up only one thread per fd. */
 		FD_CLR(i, src);
+		++n;
 	    }
 	    else {
@@ -7492,4 +7493,5 @@ intersect_fds(src, dst, max)
 	}
     }
+    return n;
 }
 
@@ -7647,7 +7649,7 @@ rb_thread_schedule()
 		    th->status = THREAD_RUNNABLE;
 		    th->wait_for = 0;
-		    intersect_fds(&readfds, &th->readfds, max);
-		    intersect_fds(&writefds, &th->writefds, max);
-		    intersect_fds(&exceptfds, &th->exceptfds, max);
+		    n = intersect_fds(&readfds, &th->readfds, max) +
+			intersect_fds(&writefds, &th->writefds, max) +
+			intersect_fds(&exceptfds, &th->exceptfds, max);
 		    th->select_value = n;
 		    found = 1;


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread

Prev Next