• Amir Gonnen's avatar
    unix/modffi: Add option to lock GC in callback, and cfun access. · cb332dda
    Amir Gonnen authored
    Add an optional 'lock' kwarg to callback that locks GC and scheduler.  This
    allows the callback to be invoked asynchronously in 'interrupt context',
    for example as a signal handler.
    
    Also add the 'cfun' member function to callback, that allows retrieving the
    C callback function address.  This is needed when the callback should be
    set to a struct field.
    
    See related #7373.
    Signed-off-by: default avatarAmir Gonnen <amirgonnen@gmail.com>
    cb332dda
modffi.c 19.9 KB