Many readers and several writers: how to manage them?

I’m reading ftp://ftp.qnx.com/usr/free/qnx4/os/libs/sync.tgz to arbitrate read and write access to the set of files.

There will be several processes reading files and one~two processes writing to the same files.

Please give a hint - how do they know the names of the locks?
Do I initialize something prior to starting those processes and by that I create lock’s names to use in readers and writers?

Tony.