Welcome to... ... the GNU Hurd!
routine file_lock ( lock_file: file_t; RPT flags: int);
Apply/manipulate advisory lock.