[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Re : Re: builtin's module and relay
From:       Ulrich Weigand <weigand () informatik ! uni-erlangen ! de>
Date:       1999-05-31 19:20:36
[Download RAW message or body]

Eric Pouech <Eric.Pouech@wanadoo.fr> wrote:

> > The real problem IMO is that the callback is actually supposed to
> > happen in the context of the process that announced the callback.
> > As soon as we get separate address spaces, this becomes critical
> > as then the callback routine itself will not be addressable in
> > the wrong context :-/
> I quite don't follow you here. For me the service thread was targetted for
> system specific tasks (like X11 event handling, timers...), so more an
> ISR type of service rather than a process oriented service. So, i don't see 
> what type of reference to the calling process you need. I sure miss something.

The most obvious characteristic of the calling process that would be
relied upon is the very address space itself:  if you install a callback
routine with address 0x12345678 from process A, where at this address 
there is indeed a routine, but the callback will be issued from process B
where no memory at all is mapped at this address, it won't work very well,
will it? ;-)

Even if the callback routine itself happens to reside in a shared memory
area that happens to be mapped at the same address in processes A and B,
though, the callback routine still might rely on other features of the
current process, e.g. it might rely on certain DLLs being loaded into 
that address space, it might try to signal an event using a handle that 
is only valid in the original process, etc ...

> > For now, I'd say the simplest way to 'fix' the problem is by doing
> >   if ( !GetModuleHandle("WINMM") ) LoadLibraryA("WINMM");
> > or so in TIME_TriggerCallBack ...
> yup, that's my second proposal, but it'll break when WINMM becomes a DLL
> as a short short short term solution, ok :-)

Here I don't understand *your* problem ;-)   As long as we don't have
separate address spaces, what's the difference whether the routine 
resides in libwine.so or else in winmm.so ?

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-7688


=========================================================================

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic