Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Cygwin compiling ctx.c fails - impossible to determine the main thread #201

Open
arjenmarkus opened this issue Dec 27, 2019 · 0 comments

Comments

@arjenmarkus
Copy link

Apparently the Cygwin platform is not supported as compiling ctx.c results in:

CC libdill_la-stack.lo
CC libdill_la-ctx.lo
ctx.c:102:2: error: #error "Cannot determine which thread is the main thread."
#error "Cannot determine which thread is the main thread."
^~~~~
ctx.c: In function ‘dill_ctx_term’:
ctx.c:123:8: warning: implicit declaration of function ‘dill_ismain’; did you mean ‘dill_clean’? [-Wimplicit-function-declaration]
if(dill_ismain()) dill_main = NULL;
^~~~~~~~~~~
dill_clean
make[1]: *** [Makefile:1729: libdill_la-ctx.lo] Error 1

Is there any workaround for this? Some research brought up the function pthread_equal() as the portable way to compare thread IDs. Of course, this would mean that some initialisation is required to make sure the ID of the main thread is stored.
(For the moment my naïve workaround to use pthread_self() as with the __sun case works for my current very limited use case, connecting programs via TCP.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant