Do different threads within a single process have distinct independent file descriptor tables? If multiple threads within the same process concurrently access a single file,
You can still share the same filedescriptor among multiple threads,i.e, parallel reads/writes to the same file is guaranteed to be atomic using pread()/pwrite() as you will need to specify offset and number of bytes to read/write respectively.