Skip to content

thread safety of DETOUR_ORIG_CALL and DETOUR_ORIG_GET #2

Description

@Kethen

I was intrigued by the way it detours without a trampoline, but as I discussed that with my partner he pointed out that DETOUR_ORIG_CALL isn't thread safe, given how it restores the function, runs the function, then re-hook the function.

If the library were to provide thread safety for users of the library, what would be an acceptable way to implement per detour context mutex?

  • pthread/mingw-w64 pthread?
  • pthread/CreateMutexA?
  • c++ std::mutex?
  • other ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions