Re: Where is O_SHLOCK and O_EXLOCK defined?

2010-11-19 Thread T. Alex Chen
: Where is O_SHLOCK and O_EXLOCK defined? "T. Alex Chen" writes: > I am trying to use 'open()' with some file control flags. According to > Linux manual of 'open()': What Linux man page are you looking at that contains that list?  man open(2) in manpages-de

Atomic operations

2010-11-19 Thread T. Alex Chen
I want to do atomic operation and find there is already such implementation in Linux, e.g. atomic_add, atomic_set, atomic_cmpset, etc, after I google on the Web. I find a libatomic-ops-dev package and install it. But there is still no man page after the installation. Did I install the right pack

Using statfs to check a remote file

2010-11-19 Thread T. Alex Chen
How do I determine if a file is a remote mounted file from statfs() call, i.e. which member of the 'struct statfs' contains information to indicate the file is NOT a local file? Any help is appreciated.  Alex

Where is O_SHLOCK and O_EXLOCK defined?

2010-11-19 Thread T. Alex Chen
I am trying to use 'open()' with some file control flags. According to Linux manual of 'open()': int open(const char *path, int flags, ...); .. The flags specified are formed by or’ing the following values O_RDONLY open for reading only O_WRONLY open for writing only O_RDWR open for readin