Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2d36a71254d9
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6d390c04ee2f
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 28, 2016

  1. Revert "[Truffle] Comment out some threading things which cause us pr…

    …oblems in Sulong."
    
    This reverts commit 2d36a71.
    chrisseaton committed Aug 28, 2016
    Copy the full SHA
    927d7dd View commit details
  2. Copy the full SHA
    c343c8b View commit details
  3. Copy the full SHA
    6d390c0 View commit details
Showing with 10 additions and 12 deletions.
  1. +1 −3 tool/jt.rb
  2. +1 −1 truffle/src/main/c/openssl/.jruby-cext-build.yml
  3. +8 −8 truffle/src/main/c/openssl/ossl.c
4 changes: 1 addition & 3 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -548,9 +548,7 @@ def build(*options)
no_openssl = options.delete('--no-openssl')
cextc "#{JRUBY_DIR}/truffle/src/main/c/cext"
unless no_openssl
cextc "#{JRUBY_DIR}/truffle/src/main/c/openssl",
'-DRUBY_EXTCONF_H="extconf.h"',
'-Werror=implicit-function-declaration'
cextc "#{JRUBY_DIR}/truffle/src/main/c/openssl"
end
when nil
mvn env, *maven_options, 'package'
2 changes: 1 addition & 1 deletion truffle/src/main/c/openssl/.jruby-cext-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
src: ./*.c
cflags: -I$OPENSSL_INCLUDE
cflags: -I$OPENSSL_INCLUDE -DRUBY_EXTCONF_H="extconf.h" -DHAVE_OPENSSL_110_THREADING_API -Werror=implicit-function-declaration
libs: $OPENSSL_LIB
out: ../../../../../lib/ruby/truffle/openssl/openssl.su
16 changes: 8 additions & 8 deletions truffle/src/main/c/openssl/ossl.c
Original file line number Diff line number Diff line change
@@ -539,7 +539,7 @@ static struct CRYPTO_dynlock_value *
ossl_dyn_create_callback(const char *file, int line)
{
struct CRYPTO_dynlock_value *dynlock = (struct CRYPTO_dynlock_value *)OPENSSL_malloc((int)sizeof(struct CRYPTO_dynlock_value));
//rb_nativethread_lock_initialize(&dynlock->lock);
rb_nativethread_lock_initialize(&dynlock->lock);
return dynlock;
}

@@ -583,18 +583,18 @@ static void Init_ossl_locks(void)
rb_raise(rb_eNoMemError, "CRYPTO_num_locks() is too big: %d", num_locks);
}
for (i = 0; i < num_locks; i++) {
//rb_nativethread_lock_initialize(&ossl_locks[i]);
rb_nativethread_lock_initialize(&ossl_locks[i]);
}

#ifdef HAVE_CRYPTO_THREADID_PTR
//CRYPTO_THREADID_set_callback(ossl_threadid_func);
CRYPTO_THREADID_set_callback(ossl_threadid_func);
#else
//CRYPTO_set_id_callback(ossl_thread_id);
CRYPTO_set_id_callback(ossl_thread_id);
#endif
//CRYPTO_set_locking_callback(ossl_lock_callback);
//CRYPTO_set_dynlock_create_callback(ossl_dyn_create_callback);
//CRYPTO_set_dynlock_lock_callback(ossl_dyn_lock_callback);
//CRYPTO_set_dynlock_destroy_callback(ossl_dyn_destroy_callback);
CRYPTO_set_locking_callback(ossl_lock_callback);
CRYPTO_set_dynlock_create_callback(ossl_dyn_create_callback);
CRYPTO_set_dynlock_lock_callback(ossl_dyn_lock_callback);
CRYPTO_set_dynlock_destroy_callback(ossl_dyn_destroy_callback);
}
#endif /* !HAVE_OPENSSL_110_THREADING_API */