Add PID helper

This commit is contained in:
Pragyansh Chaturvedi
2025-09-19 22:58:16 +05:30
parent 95727e3374
commit b0f18229d9
3 changed files with 24 additions and 2 deletions

View File

@ -3,6 +3,9 @@ import ctypes
def ktime():
return ctypes.c_int64(0)
def pid():
return ctypes.c_int32(0)
def deref(ptr):
"dereference a pointer"
result = ctypes.cast(ptr, ctypes.POINTER(ctypes.c_void_p)).contents.value