wasm-posix-host
    Preparing search index...

    Class SharedLockTable

    Index

    Methods

    • Check if a lock would be blocked. Returns the blocking lock info, or null. (Used for F_GETLK and for F_SETLK conflict check.)

      Parameters

      • pathHash: number
      • lockType: number
      • start: bigint
      • len: bigint
      • pid: number

      Returns LockInfo | null

    • Remove all locks held by a given pid (cleanup on process exit).

      Parameters

      • pid: number

      Returns void

    • Set a lock (non-blocking). For F_UNLCK, removes matching locks. Returns true on success, false if conflicting lock exists (EAGAIN).

      Parameters

      • pathHash: number
      • pid: number
      • lockType: number
      • start: bigint
      • len: bigint

      Returns boolean

    • Set a lock, blocking until it can be acquired (F_SETLKW). Uses Atomics.wait on wake_counter to sleep between retries.

      Parameters

      • pathHash: number
      • pid: number
      • lockType: number
      • start: bigint
      • len: bigint

      Returns void

    • FNV-1a hash of a string, returning a signed i32.

      Parameters

      • path: string

      Returns number