mirror of https://github.com/l4ka/pistachio.git
BUGFIX: clobber memory in do_ipc to prevent
gcc4.3 from setting MRs _after_ performing the IPC. (thx to R. Neider for his help)
This commit is contained in:
parent
74dd311bb3
commit
372c86ac62
|
@ -301,21 +301,23 @@ INLINE msg_tag_t tcb_t::do_ipc(threadid_t to_tid, threadid_t from_tid, timeout_t
|
|||
{
|
||||
msg_tag_t tag;
|
||||
word_t mr1, mr2, dummy;
|
||||
asm("pushl %%ebp \n"
|
||||
asm volatile
|
||||
("pushl %%ebp \n"
|
||||
"pushl %%ecx \n"
|
||||
"call sys_ipc \n"
|
||||
"addl $4, %%esp \n"
|
||||
"movl %%ebp, %%ecx \n"
|
||||
"popl %%ebp \n"
|
||||
: "=S"(tag.raw),
|
||||
"=b"(mr1),
|
||||
"=c"(mr2),
|
||||
"=a"(dummy),
|
||||
"=d"(dummy)
|
||||
"=b"(mr1),
|
||||
"=c"(mr2),
|
||||
"=a"(dummy),
|
||||
"=d"(dummy)
|
||||
: "a"(to_tid.get_raw()),
|
||||
"d"(from_tid.get_raw()),
|
||||
"c"(timeout.raw)
|
||||
: "edi");
|
||||
: "edi",
|
||||
"memory");
|
||||
set_mr(1, mr1);
|
||||
set_mr(2, mr2);
|
||||
return tag;
|
||||
|
|
Loading…
Reference in New Issue