コード例 #1
0
def _new(thread_handle, arg):
    # No shadowstack manipulation here (no usage of gc references)
    sscopy = sscopy_detach_shadow_stack()
    gcrootfinder.sscopy = sscopy
    if not sscopy:
        return _c.null_handle
    h = _c.new(thread_handle, llhelper(_c.run_fn, _new_callback), arg)
    sscopy_attach_shadow_stack(sscopy)
    return h
コード例 #2
0
def _new(thread_handle, arg):
    # No shadowstack manipulation here (no usage of gc references)
    sscopy = sscopy_detach_shadow_stack()
    gcrootfinder.sscopy = sscopy
    if not sscopy:
        return _c.null_handle
    h = _c.new(thread_handle, llhelper(_c.run_fn, _new_callback), arg)
    sscopy_attach_shadow_stack(sscopy)
    return h
コード例 #3
0
def _new_callback():
    # Here, we just closed the stack.  Get the stack anchor, store
    # it in the gcrootfinder.suspstack.anchor, and create a new
    # stacklet with stacklet_new().  If this call fails, then we
    # are just returning NULL.
    _stack_just_closed()
    #
    return _c.new(gcrootfinder.newthrd, llhelper(_c.run_fn, _new_runfn),
                  llmemory.NULL)
コード例 #4
0
ファイル: _stacklet_asmgcc.py プロジェクト: Darriall/pypy
def _new_callback():
    # Here, we just closed the stack.  Get the stack anchor, store
    # it in the gcrootfinder.suspstack.anchor, and create a new
    # stacklet with stacklet_new().  If this call fails, then we
    # are just returning NULL.
    _stack_just_closed()
    #
    return _c.new(gcrootfinder.newthrd, llhelper(_c.run_fn, _new_runfn),
                  llmemory.NULL)
コード例 #5
0
 def new(thrd, callback, arg):
     h = _c.new(thrd._thrd, llhelper(_c.run_fn, callback), arg)
     if not h:
         raise MemoryError
     return h
コード例 #6
0
ファイル: _stacklet_n_a.py プロジェクト: charred/pypy
 def new(thrd, callback, arg):
     h = _c.new(thrd._thrd, llhelper(_c.run_fn, callback), arg)
     if not h:
         raise MemoryError
     return h
コード例 #7
0
ファイル: _stacklet_shadowstack.py プロジェクト: charred/pypy
 def new(thrd, callback, arg):
     gcrootfinder.callback = callback
     thread_handle = thrd._thrd
     prepare_old_suspstack()
     h = _c.new(thread_handle, llhelper(_c.run_fn, _new_callback), arg)
     return get_result_suspstack(h)