Using Thread.critical emits a warning, so using rb_thread_critical probably should too.
There are still some places in eval.c and gc.c that use rb_thread_critical. These should probably be fixed.
Index: rubysig.h
===================================================================
--- rubysig.h (revision 12409)
+++ rubysig.h (working copy)
@@ -72,7 +72,7 @@
RUBY_EXTERN rb_atomic_t rb_trap_pending;
void rb_trap_restore_mask(void);
-RUBY_EXTERN int rb_thread_critical;
+DEPRECATED(RUBY_EXTERN int rb_thread_critical);
void rb_thread_schedule(void);
#endif /* ifndef RUBYSIG_H */
|