[M3devel] openbsd/pthread/sigaltstack..
Jay K
jay.krell at cornell.edu
Wed Jul 28 18:38:49 CEST 2010
For the record..:
Latest experiments:
pthreads on OpenBSD hit some problems, assertion failures. I didn't debug. Maybe should.
The sigaltstack strategy to portable user threads works. But it hangs on OpenBSD if you use -pthread. I didn't debug the hang. Maybe should.
So it seems viable to be portable with sigaltstack and omit -pthread.
But if you omit -pthread, then you run into e.g.:
http://hudson.modula3.com:8080/job/cm3-current-test-all-pkgs-I386_OPENBSD/3/artifact/cm3-pkg-report-I386_OPENBSD.html#tr_m3-db-odbc
/usr/local/lib/libiodbc.so.3.15: undefined reference to `pthread_mutex_unlock'
/usr/local/lib/libiodbc.so.3.15: undefined reference to `pthread_self'
/usr/local/lib/libiodbc.so.3.15: undefined reference to `pthread_mutex_lock'
/usr/local/lib/libiodbc.so.3.15: undefined reference to `pthread_mutex_init'
So the choice is unfortunate: much more portability with sigaltstack, or don't support packages such as odbc, or heck, just don't support OpenBSD, or debug the pthread problem (not the hang, though there is that, the problem of using actual pthreads).
I'm also not keen on a solutiion that "randomly" stops working when user links with -pthread. It should work the same either way (at least if it links either way).
For now I'm ok with jmpbuf hacking, but it disappointing.
5.8.6 used jmpbug hacking.
- Jay
More information about the M3devel
mailing list