▲ | jojomodding 10 hours ago | |
How is a critical section different from a lock? | ||
▲ | nitwit005 7 hours ago | parent | next [-] | |
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 10 hours ago | parent | prev [-] | |
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. |