02.07.2013 Views

A/UX® Programmer's Reference

A/UX® Programmer's Reference

A/UX® Programmer's Reference

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.

intro(2) intro(2)<br />

16<br />

structure includes the following members:<br />

ushort cuid; /* creator user ID */<br />

ushort cgid; /* creator group ID */<br />

ushort uid; /* user ID */<br />

ushort gid; /* group ID */<br />

ushort mode; /* ria permission */<br />

The value of sern nserns is equal to the number of semaphores<br />

in the set Each semaphore in the set is referenced by a positive<br />

integer referred to as a sern num. sern num values run sequentially<br />

from 0 to the value ofsern nserns minus 1. sern otirne<br />

is the time of the last sernop(2) operation, and sern ctirne is<br />

the time of the last sernctl(2) operation that changed a member<br />

of the structure described earlier.<br />

A semaphore is a data structure that contains the following<br />

members:<br />

ushort semval; /* semaphore value */<br />

short sempid; /* pid of last operation */<br />

ushort semncnt; /* # awaiting semval > cval */<br />

ushort semzcnt; /* # awaiting semval = 0 */<br />

sernval is a non-negative integer. sernpid is equal to the process<br />

ID of the last process that performed a semaphore operation<br />

on this semaphore. sernncnt is a count of the number of<br />

processes that are currently suspended and awaiting this<br />

semaphore's sernval to become greater than its current value.<br />

sernzcnt is a count of the number of processes that are currently<br />

suspended awaiting this semaphore's sernval to become O.<br />

Shared Memory Identifier<br />

A shared memory identifier (shmid) is a unique positive integer<br />

created by a shrnget(2) system call. Each shmid has a segment<br />

of memory (referred to as a shared memory segment) and a data<br />

structure associated with it. The data structure referred to as<br />

shrnid _ ds contains the following members:<br />

struct ipc_perm shm_perm; /* operation permission struct */<br />

int shm_segsz; /* size of segment */<br />

ushort shm_cpid; /* creator pid */<br />

ushort shm lpid; /* pid of last operation */<br />

short shm=nattch; /* number of current attaches */<br />

time<br />

-<br />

t<br />

time t<br />

-<br />

time<br />

-<br />

t<br />

shm atime;<br />

shm=dtime;<br />

shm ctime;<br />

/* last attach time */<br />

/* last detach time */<br />

/* last change time */<br />

/* Times measured in secs<br />

since 00:00:00 GMT, 1/1/70 */<br />

shrn_perrn is an ipcyerrn structure that specifies the shared-<br />

February, 1990<br />

RevisionC

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

Saved successfully!

Ooh no, something went wrong!