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

Add support for FreeBSD #72

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

smortex
Copy link
Contributor

@smortex smortex commented May 8, 2024

In order to get the current thread id on FreeBSD, we can use the non-portable pthread_getthreadid_np() function.

Test suite pass:

romain@zappy ~/Projects/vernier % bundle exec rake                                                                                             
mkdir -p tmp/amd64-freebsd14/vernier/3.2.3
cd tmp/amd64-freebsd14/vernier/3.2.3
/usr/local/bin/ruby32 -I. ../../../../ext/vernier/extconf.rb
checking for ruby/thread.h... yes
checking for rb_internal_thread_event_data_t.thread in ruby/thread.h... no
checking for rb_profile_thread_frames() in ruby/debug.h... no
checking for pthread_setname_np()... yes
creating Makefile
cd -
cd tmp/amd64-freebsd14/vernier/3.2.3
/usr/local/bin/gmake
compiling ../../../../ext/vernier/vernier.cc
linking shared-object vernier/vernier.so
cd -
mkdir -p tmp/amd64-freebsd14/stage/lib/vernier
/usr/local/bin/gmake install sitearchdir=../../../../lib/vernier sitelibdir=../../../../lib/vernier target_prefix=
/usr/bin/install -c -m 0755 vernier.so ../../../../lib/vernier
cp tmp/amd64-freebsd14/vernier/3.2.3/vernier.so tmp/amd64-freebsd14/stage/lib/vernier/vernier.so
Run options: --seed 35046

# Running:

............................................S.......

Finished in 4.508479s, 11.5338 runs/s, 2226.6935 assertions/s.

52 runs, 10039 assertions, 0 failures, 0 errors, 1 skips

You have skipped tests. Run with --verbose for details.
romain@zappy ~/Projects/vernier % 

In order to get the current thread id on FreeBSD, we can use the
non-portable `pthread_getthreadid_np()` function.
Copy link
Owner

@jhawthorn jhawthorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

@jhawthorn jhawthorn merged commit a8200bb into jhawthorn:main May 10, 2024
7 checks passed
@smortex smortex deleted the add-freebsd-support branch May 18, 2024 17:57
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

Successfully merging this pull request may close these issues.

2 participants