3 comments

  • jojomodding a day ago ago

    How is a critical section different from a lock?

    • nitwit005 21 hours ago ago

      They gave the different sorts of locks different names. Locks usable across processes are mutexes, and locks only usable within a process are critical sections.

    • bitwize a day ago ago

      It's a kind of lock. Critsecs are faster and lighter weight than mutices (kinda like a futex), but cannot be shared between processes, only threads within a process. Mutices can be shared between processes but because of that they have to make syscalls every time they're locked or released.