[PATCH] server: Use syscall(2) instead of inline assembly on Mac OS, too.

David Laight david at l8s.co.uk
Sun Oct 9 14:42:41 CDT 2011


On Sat, Oct 08, 2011 at 07:48:40PM +0200, Alexandre Julliard wrote:
> Charles Davis <cdavis at mymail.mines.edu> writes:
> 
> > @@ -268,9 +256,9 @@ int send_thread_signal( struct thread *thread, int sig )
> >          if (!mach_port_extract_right( process_port, thread->unix_tid,
> >                                        MACH_MSG_TYPE_COPY_SEND, &port, &type ))
> >          {
> > -            if ((ret = pthread_kill_syscall( port, sig )) < 0)
> > +            if ((ret = syscall( SYS___pthread_kill, port, sig )) != 0)
> >              {
> > -                errno = -ret;
> > +                errno = ret;
> 
> syscall is supposed to take care of errno.

I'm also not at all sure of the portability of using syscall() in
application code.

What happens when you try to run the above on anything other than Linux?
(Eg aone of the BSDs)

	David

-- 
David Laight: david at l8s.co.uk



More information about the wine-devel mailing list