清理了 t.CVoid

This commit is contained in:
TermiNexus committed 2026-09-16 16:07:35 +08:00
1 parent 119951c5df
commit 785e825518
50 files changed
+15657 -15664

No files matched your search

+6 -6
View File
@@ -9,7 +9,7 @@ ATOMIC_ACQ_REL: t.CDefine = 4
ATOMIC_SEQ_CST: t.CDefine = 5
def __atomic_test_and_set(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CBool:
def __atomic_test_and_set(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> bool:
result: t.CUInt8T = 1
c.Asm(f"""mov al, 1
xchg byte ptr [{c.AsmInp(ptr, t.ASM_DESCR.REG_ANY)}], al
@@ -19,23 +19,23 @@ def __atomic_test_and_set(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CBool:
return t.CBool(result)
def __atomic_clear(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CVoid:
def __atomic_clear(ptr: t.CUInt64T | t.CPtr, order: t.CInt):
c.Asm(f"""mov byte ptr [{c.AsmInp(ptr, t.ASM_DESCR.REG_ANY)}], 0""",
inp = [c.AsmInp(ptr, t.ASM_DESCR.REG_ANY)],
op = [t.ASM_DESCR.CLOBBER_MEMORY])
def __atomic_thread_fence(order: t.CInt) -> t.CVoid:
def __atomic_thread_fence(order: t.CInt):
c.Asm("mfence", op=[t.ASM_DESCR.CLOBBER_MEMORY])
def __atomic_signal_fence(order: t.CInt) -> t.CVoid:
def __atomic_signal_fence(order: t.CInt):
pass
def __atomic_always_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool:
def __atomic_always_lock_free(size: t.CSizeT, ptr: t.CPtr) -> t.CBool:
return t.CBool(1)
def __atomic_is_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool:
def __atomic_is_lock_free(size: t.CSizeT, ptr: t.CPtr) -> t.CBool:
return t.CBool(1)