unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Crash at startup in Cygwin w32 build on emacs-25 branch
Date: Sat, 28 Nov 2015 10:18:03 +0200	[thread overview]
Message-ID: <83d1uur0zo.fsf@gnu.org> (raw)
In-Reply-To: <86oaef2eiw.fsf@gmail.com>

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Fri, 27 Nov 2015 23:44:55 +0000
> 
> > I couldn't imagine Cygwin needs the thread information.
> 
> Only the Cygwin w32 build, which sets HAVE_NTGUI and uses the Windows
> GUI code for display (so no need for an X11 server).

Yes, I know.  But the way the Cygwin w32 build gets input is very
different from the native build.  Threads other than the main one are
used in the native build to receive messages from MS-Windows, in order
to emulate the read-socket hook and some other Posix features (like
interval timers).  AFAIU, Cygwin reads from /dev/windows pseudo-device
using the "normal" Posix reads from a file descriptor.  That's why I
didn't think about Cygwin in this case: I don't think it launches any
non-main threads.

> The module code also uses dwMainThreadId for error checking, and may
> need similar changes for the Cygwin w32 build.

The use of dwMainThreadId in emacs-module.c is guarded by WINDOWSNT,
so is not compiled into the Cygwin w32 build.  I believe the latter
uses pthreads for that.

> It may be safer to provide the thread ID from a function to ensure
> that it has been initialised before callers try to use it.

Not sure what you mean here.  Do you mean use an accessor instead of a
global variable?  If so, I don't understand the rationale.

> > Btw, it's high time you got write access to the repository.  Would you
> > like that?
> 
> That would prbably make sense. What needs to be done to arrange that ?

Get a Savannah account (http://savannah.gnu.org/account/register.php,
I believe), then apply for membership in the Emacs project.

Thanks.



  reply	other threads:[~2015-11-28  8:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  0:13 Crash at startup in Cygwin w32 build on emacs-25 branch Andy Moreton
2015-11-27  8:03 ` Eli Zaretskii
2015-11-27 23:44   ` Andy Moreton
2015-11-28  8:18     ` Eli Zaretskii [this message]
2015-11-28 21:18       ` Andy Moreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d1uur0zo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=andrewjmoreton@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).