From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
Eli Zaretskii wrote:
>> Same error on rhel 7.4 if configure with --without-threads --with-= modules.
>>
>>=C2=A0 =C2=A0Emacs module assertion: Module function called from ou= tside the current
>>=C2=A0 =C2=A0Lisp thread
>
> Does this go away if you put
>
>=C2=A0 =C2=A0return true;
>
> at the end of in_current_thread, outside of all the #ifdef's?
No.
emacs-module.=
c:814:42: error: incompatible integer to pointer conversion =
passing 'sys_thread_t' (aka 'int') to parameter of type =
9;pthread_t _Nullable'
=C2=A0 =C2=A0 =C2=A0 (aka = 9;struct _opaque_pthread_t *') [-Werror,-Wint-conversion]
=C2=A0 return pthread_equal (pthre= ad_self (), current_thread->thread_id);
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~~~~~~~~~~~~~~~~~~~~~~~~=
/usr/include/= pthread.h:340:59: note: passing argument to parameter here
int pthread_equa= l(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 pl= atforms).
Maybe systhread.h should ha= ve a function
extern sys_thread_t sys_thread= _self ();
so emacs-module.c doesn't have= to care about the threading implementations.