spall
2017-12-5 18:26:56

I am trying to add ‘disable-interrupts’ and ‘enable-interrupts’ to the Racket C code, and am getting this error when doing


spall
2017-12-5 18:27:05

‘make base’ unsafe-immutable-hash-iterate-pair: arity mismatch; the expected number of arguments does not match the given number expected: 2 given: 1 arguments...: '#(#<procedure> #<procedure> #<procedure>)


spall
2017-12-5 18:27:37

It doesn’t point me to a line number, what did I miss?


spall
2017-12-5 18:28:17

I tried to copy how ‘collect_garbage’ is declard


spall
2017-12-5 18:28:55

@mflatt @samth


mflatt
2017-12-5 19:08:54

@spall Did you change the version number? Bytecode files depend on the exact set of primitives at the time they were compiled. Meanwhile, can you say more about why disable-interrupts? That sounds similar to start-atomic, which is already in one of the built-in modules – but it’s implemented at the “thread” layer, so I don’t have a good guess about your goal.


spall
2017-12-5 19:19:14

My goal is to be able to disable garbage collection from a racket program


spall
2017-12-5 19:19:39

>Did you change the version number? Bytecode files depend on the exact set of primitives at the time they were compiled. I’m not sure….


spall
2017-12-5 19:21:20

Would start-atomic disable garbage collection?


samth
2017-12-5 19:32:49

@mflatt to explain more, disable-interrupts in Chez disables GC, which is what @spall is trying to do — I think her implementation on C-Racket is just (void)


samth
2017-12-5 19:33:08

@spall you definitely need to change the version number and disable compiled startup


spall
2017-12-5 19:47:20

How do I do that?


mflatt
2017-12-5 20:46:54

@spall start-atomic won’t disable GC, but you could implement a new operation using scheme_enable_garbage_collection. Please call it garbage-collection-enabled, or something like that, instead of disable-interrupts. I imagine that you’re adding it to #%unsafe alongside start-atomic. You’ve probably found “schvers.h” to set the version number. For racket7(-not-on-Chez), you don’t need to disable compiled startup, because that part of the build process is a little more automated than before. Are you trying to disable GC for some testing purpose, or is that needed as part of some implementation?


samth
2017-12-5 20:47:28

benchmarking parallelism on chez