26.02.2014 Views

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

© 2009, <strong>QNX</strong> <strong>Software</strong> <strong>Systems</strong> GmbH & Co. KG. Writing a resource manager<br />

lock_count<br />

count<br />

rcount<br />

wcount<br />

rlocks<br />

wlocks<br />

mmap_list<br />

lock_list<br />

list<br />

list_size<br />

nbytes<br />

inode<br />

uid<br />

gid<br />

mtime<br />

atime<br />

ctime<br />

Indicates how many threads are trying to use this attributes structure.<br />

A value of zero indicates that the structure is unlocked. A value of one<br />

or more indicates that one or more threads are using the structure.<br />

Indicates the number of OCBs that have this attributes structure open<br />

for any reason. For example, if one client has an OCB open for read,<br />

another client has another OCB open for read/write, and both OCBs<br />

point to this attribute structure, then the value of count would be 2, to<br />

indicate that two clients have this resource open.<br />

Count readers. In the example given for count, rcount would also have<br />

the value 2, because two clients have the resource open for reading.<br />

Count writers. In the example given for count, wcount would have the<br />

value 1, because only one of the clients has this resource open for<br />

writing.<br />

Indicates the number of OCBs that have read locks on the particular<br />

resource. If zero, means there are no read locks, but there may be<br />

write locks.<br />

Same as rlocks but for write locks.<br />

Used internally by POSIX iofunc_mmap_default().<br />

Used internally by POSIX iofunc_lock_default().<br />

Reserved for future use.<br />

Size of area reserved by list.<br />

Size of the resource, in bytes. For example, if this resource described<br />

a particular file, and that file was 7756 bytes in size, then the nbytes<br />

member would contain the number 7756.<br />

Contains a file or resource serial number, that must be unique per<br />

mountpoint. The inode should never be zero, because zero<br />

traditionally indicates a file that’s not in use.<br />

User ID of the owner of this resource.<br />

Group ID of the owner of this resource.<br />

File modification time, updated or at least invalidated whenever a<br />

client write() is processed.<br />

File access time, updated or at least invalidated whenever a client<br />

read() that returns more than zero bytes is processed.<br />

File change time, updated or at least invalidated whenever a client<br />

write(), chown(), orchmod() is processed.<br />

April 30, 2009 Chapter 5 • Resource Managers 223

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!