Example #1
0
def check_error(ret):
    # Return True is error was EINTR (which usually means that OS call
    # should be restarted).
    if ret == -1:
        e = uos.errno()
        if e == errno_.EINTR:
            return True
        raise OSError(e)
Example #2
0
def check_error(ret):
    # Return True is error was EINTR (which usually means that OS call
    # should be restarted).
    if ret == -1:
        e = uos.errno()
        if e == errno_.EINTR:
            return True
        raise OSError(e)
Example #3
0
def check_error(ret, hide_eintr=False):
    # If hide_eintr is set and error was EINTR, return True. (Which usually
    # means that OS call should be restarted).
    if ret == -1:
        e = uos.errno()
        if hide_eintr and e == errno.EINTR:
            return True
        raise OSError(e)
Example #4
0
def timer_delete(tid):
    try:
        r = timer_delete_(tid)
        # print("timer_delete", r, uos.errno())
        os.check_error(r)
    except OSError:
        e = uos.errno()
        if e != errno.EINVAL:
            raise(e)
Example #5
0
def raise_error():
    raise OSError(uos.errno())
Example #6
0
def raise_error():
    raise OSError(uos.errno())