[patch] Re: [patch] Re: Timeout overflow in select()

Andrea Arcangeli (andrea@e-mind.com)
Fri, 27 Nov 1998 01:40:22 +0100 (CET)


On Thu, 26 Nov 1998, Andrea Arcangeli wrote:

>I tried to include <linux/sched.h> but the compiler doesn' t allow to use
>((unsigned) MAX_SCHEDULE_TIMEOUT) instead of (~0UL >> 1). The right thing
>to do would be to use ((unsigned) MAX_SCHEDULE_TIMEOUT) instead of
>(~0UL>>1) of course... Try and let me know...

Still don' t want to include MAX_SCHEDULE_TIMEOUT and I have not the time
to understand the why right now (it' s a little trivally fixable detail).

>>would be "a NULL *timespec", but that's not an option. There's also the
>>eternal question: are jiffies signed or unsigned?
>
>Woops it has to be unsigned I think. This because jiffies in such function
>is really a delta... Thanks for the bugfix.

Really unsigned make not a lot of sense because the other way function
only handle positive-signed values... but I' ll left unsigned for some
possible alien use...

>Yes this is true. I' ll try to do that soon. Right now I only fixed the

I've done that. Now four (not very nice to see ;-) macro does the hard
work. I hope they are OK... Let me know. The booted kernel is working fine
so far but I have not a lot of time to simulate the functions in userspace by
hand now...

Here the new patch:

begin 664 time.h-patch.gz
M'XL(".?R738``W1I;65V86PM,BXQ+C$R.0"M67ESVDH2_UM\BDY2\4H6`H2)
M#WAVQ8EQP@8?A?$F+_6J5+(8C-9"8G7X2.+][-L],Q*2$+:S]4A5#)KNGCY^
MT\=HX$_8?1<\UT_NFZ[O>,F$-<6OV)VSQJPV<:=3,)(G2+IF@_][`4FCW3#-
MFF$8+Z!5CD,73H-;:+>@U>JVS*[9`7-O;[>FZ_H3_$N^'4"FK5;7W!-\[]^#
M8;;K6QW0\8_9?@?OW]?@L5>#-\Q'.Z&Y"=;%>'3Y<6R-!R?]B_/^1]ALUJ"F
MOYFPJ>LSY>3PF_7/P?'QGXKZW];E$`X.P-1J>@U9:P9L@C.S_6L&I,FM[4$<
MP+_1?RZ+ZA"'#ZY_38_LV\"=0#QCG&4>1#$$5[=ND$00W+)PZ@5W4:-1TW'Q
M]&S<[Q(I>`$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1;
M6!I=GI(Z]%"YPK-T0YPX"]F)%W<IW:*+\'_TT5>&_:#_#XCASL:PXPF7:BYB
ML/-J+X3>'&6"-72C&_G"T;&Q\0`G$'2!WX`//"N@"!LFS)YX`2*R9V@-P=OD
MO4S.?VC(6M^).+WU)MBM"D>](D^EDP)^B@%ZSH<OJIX$3`+ENSV<^%J@;YN=
M.F;Z=#:=HC-Q&\RDEH74/KO'W6=V9#F+1$#;D`]E*@BH=:$WJD316V8KV<4L
M0G9+9X=XJ)712UN@K4^)2V\9T+0;\D'#"3!J][$5W2&"=9T;30/#?)Y8<DWE
M>_$5`72LX%R/NES@J7:[U>&#^7;;E-T'CN-8YFYPZ"!H0/006;[M!Y''V&+U
M96GXGWA1<6$?SN,%OZ\O'''Q"J2W\EXU/=SR+>3RK)/S5"=8/%B$#-$9;V!?
M+W<50V]I`SDIRNL80]P,I-:VMX6UG2UI;4;82E&!K2_??VWOH_$&*M\_-9:O
;!?1GN85=+^R;,F$K!5:LH+3_`69.N?."(0``
`
end

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/