Hi!
I found strange behaviour of l4_i386_ipc_wait(). In case of interrupt IPC, it return wrong value of the thread id of IPC source.
*** Version
$gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs gcc version 2.95.3 20010315 (release)
$as -v
GNU assembler version 2.11 (i686-pc-linux-gnu) using BFD version 2.11
$ld -v
GNU ld version 2.11 (with BFD 2.11)
*** UUencoded source code
begin 644 test.tar.gz M'XL(`-=5CCT``^U:67/;1A+V*Z;*_V%B20XIDR!(4Y:+BE/10<M:4>*<C;> MV(L"@:&("`<#@#KBTO[V_7IP\U!<J;6=![1*)&:FIZ>[IZ>/`<T@TM3AHR* M6EO37G2[CS1-:V]O:<5O@N?MYYU'VO96]WFWLZUUM@A_^_F+1US[LFS%,`LC M(^#\D2-NC8?Q1!!^#8:^+JQ98FQ[@NOZ[G#8/]X;O-=UMF9[IC.S!/_!Z;9, MWYW:C@C4R8],88H:B=N(L?[)Q?G[FJZ;0:1;,]>]T_5ZVDD:C=)6TE`<83@* M&N958T.$4Z:8AN,HP_?'>Z<#_63WN%]S#=L#8B`*Y).^UB;?!SJG_TO''QD. M-WTOC(*9&?E!J'*^V9)+*+*-%4:WK-U37/_:46K4JJ//N&6*'S@*/27-W_Y0 M.N.$E\VXR[`L1UGOQC24W]RITAZQ3B_FBR<`AHYG3F3O^7[$)*P1,";/!2" MN]0]0K<ZB=E:L?0,13<'[R&;E,*JN'8EQ[G7;8FG%`0Q>]2I`:/)D;$76%X MW%#]6<2-,!3N"+M`%.=)=$#"L^QQIC9WI,<\U7-<Q_<N:W=MO=V#_8TK<-+ M@.5=X](V2_2S.71BZ:@NS!D[QF78X[NG[R[TMX-W!X?]902:11+-`@+F$5[ M*(A!2\6/.K8G6+9&:6;)+&FRXQO6RJFZL(S(4!0E180V'T#VK!AU%(8/8I8X MBH!31->%-Q)>\5A`@V&KW!JF$)I:YTNDT>DQQ@P_S41V'_O+C7Y:R.P#1@! M]X2P;*QA%$!MT-N"=,Q`F%QV^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@@HJ^&;P/[=^;\8`4``` ` end
Best regards Alexei
Hi!
On Mon Sep 23, 2002 at 01:06:56 +0000, Alexey Mandrookin wrote:
I found strange behaviour of l4_i386_ipc_wait(). In case of interrupt IPC, it return wrong value of the thread id of IPC source.
You're waiting for a specific interrupt, how useful it is to know the "source" if you already have the dest id (this specific interrupt)?
If you're waiting for an interrupt, use ipc_receive, don't care about source stuff (also see p. 29 of the L4-V2 ref manual).
Adam
Hi!
From: "Adam Lackorzynski" adam@os.inf.tu-dresden.de
On Mon Sep 23, 2002 at 01:06:56 +0000, Alexey Mandrookin wrote:
I found strange behaviour of l4_i386_ipc_wait(). In case of interrupt IPC, it return wrong value of the thread id of IPC source.
You're waiting for a specific interrupt, how useful it is to know the "source" if you already have the dest id (this specific interrupt)?
Due to synchronous style of micro kernel, it is very useful to know IPC source.
Point is that thread wait events from two sources and it need exactly distinguish
who is sent event.
Let me explain problem. Thread 5.1 is an interrupt handler. Thread 5.0 is a user task.
By the term, user task cannot wait for key press events, it need only occasionally,
when no calculations or other work present. The way of hardware interrupt is:
OS interrupt -> Interrupt handler (5.1) -> User task (5.0)
As you can see, the Task 5.0 must wait for IPC from thread 5.1, otherwise task 5.1
will locked in l4_i386_ipc_send () function. In that case, next interrupt can be lost or pended.
Idea is send signal from 5.0 to 5.1, which will inform interrupt thread what a user task waits
for data. Next, then hardware interrupt coming, it check what user task ready for receive
(i.e. in IPC wait state). If user task waits, then IPC send from 5.1 to 5.0, otherwise data puts
into buffer.
Of course, thread 5.1 can try to send IPC to thread 5.0 in any case, and if l4_i386_ipc_send()
return L4_IPC_SETIMEOUT status, put event into buffer. In that case possible situation,
when data present at buffer, user task waits for event and no new interrupts coming.
Another example: COM1 and COM2 generate different interrupt. It is better to write single
device driver for both ports. It that case also need to know the interrupt source.
If you're waiting for an interrupt, use ipc receive, don't care about source stuff (also see p. 29 of the L4-V2 ref manual).
Yes, I read in that document, but there some differences with
http://os.inf.tu-dresden.de/papers_ps/fiasco-spec.ps.gz
Anyway, returned values not covers by any L4 documents and look strange.
Best regards
Alexei
On Tuesday 24 September 2002 10:40, Alexey Mandrookin wrote:
From: "Adam Lackorzynski" adam@os.inf.tu-dresden.de
On Mon Sep 23, 2002 at 01:06:56 +0000, Alexey Mandrookin wrote:
I found strange behaviour of l4_i386_ipc_wait(). In case of interrupt IPC, it return wrong value of the thread id of IPC source.
You're waiting for a specific interrupt, how useful it is to know the "source" if you already have the dest id (this specific interrupt)?
Due to synchronous style of micro kernel, it is very useful to know IPC source.
Right. Should be fixed now in Fiasco, try
cvs update
in fiasco/src.
Thanks for the reporting this bug.
Please report further bugreports regarding Fiasco to
fiasco-bugs@os.inf.tu-dresden.de
Frank
l4-hackers@os.inf.tu-dresden.de