flock() allows you to perform a simple reader / writer model which can be used on virtually every platform (including most Unix derivatives and even Windows).
Libération d'un verrou (partagé ou exclusif), operation = 3.