Started playing with Wineserver on mingw/cygwin again

Ulrich Weigand weigand at immd1.informatik.uni-erlangen.de
Thu Feb 6 14:40:30 CST 2003


Following up on myself:
> Eric Pouech wrote:
> 
> > among the things we have to take care of:
> > - signals: signal, in current implementation, is sent to a thread. in 
> > nptl, it's sent to the process. So, lots of thread control has to be 
> > rewritten
> > - in the same type of issues, getpid() now returns the same pid for all 
> > threads in a same process. Most of Wine code relies on having a 
> > different pid for each thread (this fix is needed, IIRC, for some 
> > Solaris port)
> 
> I think this is mostly used to implement SuspendThread / ResumeThread, 
> which cannot be portably implemented using the pthreads interface.  
> I do not know how to solve this issue without relying on implementation
> details ...

However, at least in the Linux / glibc 2.3.x case, there's a new gettid
call that returns a 'thread ID' that used to be the pid, and a new tkill
system call that can be used to send a signal to one TID, just like the
old Linux kill would send a signal to a specific thread.  I think using
those we could carry over our old Linux-specific hacks one to one, and
it still should work even if our threads are glibc 2.3.x pthreads.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand at informatik.uni-erlangen.de



More information about the wine-devel mailing list