GNU bug report logs -
#30106
Loading file /sources/emacs/lisp/emacs-lisp/ert.elc failed to provide feature `mod-test'
Previous Next
Full log
Message #82 received at 30106 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Glenn Morris <rgm <at> gnu.org> schrieb am Mi., 17. Jan. 2018 um 21:31 Uhr:
> Eli Zaretskii wrote:
>
> >> Same error on rhel 7.4 if configure with --without-threads
> --with-modules.
> >>
> >> Emacs module assertion: Module function called from outside the
> current
> >> Lisp thread
> >
> > Does this go away if you put
> >
> > return true;
> >
> > at the end of in_current_thread, outside of all the #ifdef's?
>
> No.
>
>
>
>
>
The current implementation of in_current_thread is definitely bogus if
threads are disabled; I can't even compile temacs with --without-threads
--with-modules:
*emacs-module.c:814:42: **error: **incompatible integer to pointer
conversion passing 'sys_thread_t' (aka 'int') to parameter of type
'pthread_t _Nullable'*
* (aka 'struct _opaque_pthread_t *') [-Werror,-Wint-conversion]*
return pthread_equal (pthread_self (), current_thread->thread_id);
* ^~~~~~~~~~~~~~~~~~~~~~~~~*
*/usr/include/pthread.h:340:59: note: *passing argument to parameter here
int pthread_equal(pthread_t _Nullable, pthread_t _Nullable);
because if threads are disabled, the thread ID is an int.
The function also doesn't handle the case where neither HAVE_PTHREAD nor
WINDOWSNT are defined (but maybe we don't have such platforms).
Maybe systhread.h should have a function
extern sys_thread_t sys_thread_self ();
so emacs-module.c doesn't have to care about the threading implementations.
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 34 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.